[LLVMbugs] [Bug 9396] New: -Woverloaded-virtual shouldn't warn for static functions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 3 14:07:26 PST 2011


           Summary: -Woverloaded-virtual shouldn't warn for static
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu

$ cat test.cc
class A {
  virtual void f(int) {}

class B : public A {
  static void f() {}
$ clang -c test.cc -Woverloaded-virtual
test.cc:8:15: warning: 'B::f' hides overloaded virtual function
  static void f() {}
test.cc:3:16: note: hidden overloaded virtual function 'A::f' declared here
  virtual void f(int) {}
1 warning generated.

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