http://llvm.org/bugs/show_bug.cgi?id=10004

           Summary: [QoI] warn about non-static, non-inline, non-template
                    function definitions in header files
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to