Commit Graph

8 Commits

Author SHA1 Message Date
Anastasia Stulova 4cebc9db04 [Basic] Extend DiagnosticEngine to store and format Qualifiers.
Qualifiers can now be streamed into the DiagnosticEngine using
regular << operator. If Qualifiers are empty 'unqualified' will
be printed in the diagnostic otherwise regular qual syntax is
used.

Differential Revision: https://reviews.llvm.org/D56198

llvm-svn: 350386
2019-01-04 11:50:36 +00:00
Aaron Ballman 04559a7941 Updating a comment related to the implementation of -Woverloaded-virtual, and adding a FIXME to a test case. (Drive-by removal of trailing whitespace in the test case as well.)
No functional changes.

llvm-svn: 214362
2014-07-30 23:50:53 +00:00
Richard Trieu 05c4d023f3 When -Woverloaded-virtual is triggered, call HandleFunctionTypeMismatch to add
more information to the notes.  This information is already present on other
diagnostic messages that involves overloads.

llvm-svn: 178923
2013-04-05 23:02:24 +00:00
David Blaikie 282c92a708 Handle diamond inheritance in -Woverloaded-virtual.
llvm-svn: 166254
2012-10-19 00:53:08 +00:00
David Blaikie ea4d259041 Fix -Woverloaded-virtual when the using statement refers to a base declaration of a virtual function.
GCC and Clang both do not warn on:

  struct a { virtual void func(); };
  struct b: a { virtual void func(); void func(int); };
  struct c: b { void func(int); using b::func; };

but if the "using" was using a::func GCC would still remain silent where Clang
would warn. This change makes Clang consistent with GCC's existing behavior.

llvm-svn: 166154
2012-10-17 23:45:39 +00:00
Argyrios Kyrtzidis 7a1778eba1 -Woverloaded-virtual shouldn't warn for static functions. Fixes rdar://9083431 & http://llvm.org/PR9396.
llvm-svn: 126966
2011-03-03 22:58:57 +00:00
Argyrios Kyrtzidis 7dd856a76b For -Woverloaded-virtual take into account canonical methods. Fixes rdar://8979966 & http://llvm.org/PR9182.
llvm-svn: 125296
2011-02-10 18:13:41 +00:00
Argyrios Kyrtzidis 7272d9cf36 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.

llvm-svn: 124805
2011-02-03 18:01:15 +00:00