[LLVMbugs] [Bug 14234] New: Incorrect warning "unused function ..."

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 31 23:35:41 PDT 2012


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

             Bug #: 14234
           Summary: Incorrect warning "unused function ..."
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: carrot at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Compile following c++ source code with command line

$clang++ -fsyntax-only -Wall t3.cpp

namespace {

int foo(){
  return 1;
  }

}

Clang gives unexpected warning

t3.cpp:3:5: warning: unused function 'foo' [-Wunused-function]
int foo(){
    ^

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



More information about the llvm-bugs mailing list