Extended Description
clang -Wall -Wextra produces no warnings for this:
// a.h
struct S {
void f();
};
void S::f() {}
// a.cpp
#include "a.h"
void g() {
S s;
s.f();
}
This issue is a particular efficiency drain since it doesn't manifest until link time, and requires a rebuild of all includers of the header.
Ideally, any definition which wholly comes from a header file and produces a non-weak symbol should warn. We'll need to be careful to weed out macros defined in the main source file and expanded in #included files.