]> granicus.if.org Git - clang/commit
Implement -Woverloaded-virtual.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 3 Feb 2011 18:01:15 +0000 (18:01 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 3 Feb 2011 18:01:15 +0000 (18:01 +0000)
commit799ef666685d6c97d64d1970a6f68bf7923360c2
treeb348a406a6df440684ad802300a39619c6f75500
parent86a4d0dd6a630639aab7715323ed068940e650af
Implement -Woverloaded-virtual.

The difference with gcc is that it warns if you overload virtual methods only if
the method doesn't also override any method. This is to cut down on the number of warnings
and make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423.
If we want to warn that not all overloads are overriden we can have an additional
warning like -Wpartial-override.

-Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124805 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/warn-overloaded-virtual.cpp [new file with mode: 0644]