[LLVMbugs] [Bug 11621] New: Clang does not properly implement -Woverloaded-virtual

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 19 14:32:36 PST 2011


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

             Bug #: 11621
           Summary: Clang does not properly implement -Woverloaded-virtual
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chandlerc at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


% cat x.cc
struct Base {
  virtual void f(int);
  virtual void f(float);
};

struct Dervied : Base {
  virtual void f(int);
};

% ./bin/clang -fsyntax-only -Woverloaded-virtual x.cc

% gcc -fsyntax-only -Woverloaded-virtual x.cc
x.cc:3:16: warning: 'virtual void Base::f(float)' was hidden
[-Woverloaded-virtual]
x.cc:7:16: warning:   by 'virtual void Dervied::f(int)' [-Woverloaded-virtual]


This warning has a very high value. I don't even know why it isn't in -Wall. =[

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