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

            Bug ID: 16345
           Summary: spurious warning when using header scoped anonymous
                    namespace
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 10687
  --> http://llvm.org/bugs/attachment.cgi?id=10687&action=edit
code reproducing the issue

See the simple code attached. Clang generates a diagnostic about unneeded
function:

$ clang++ -Wall main.cpp
In file included from main.cpp:1:
./foo.h:12:6: warning: function 'do_something' is not needed and will not be
      emitted [-Wunneeded-internal-declaration]
void do_something()
     ^
1 warning generated.
$

The function is needed actually. Please note that the warning is not generated
when foo and fooimpl functions are non-template functions.

The issue concerns clang version 3.2, from trunk, or 3.3 version already
available on ArchLinux OS.

-- 
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