[LLVMbugs] [Bug 16345] New: spurious warning when using header scoped anonymous namespace

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 17 01:00:44 PDT 2013


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: unassignedclangbugs at nondot.org
          Reporter: tmmikolajczyk at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130617/5ec721a2/attachment.html>


More information about the llvm-bugs mailing list