[clang-tools-extra] r213501 - clang-tidy: [misc-use-override] Slightly tweak the wording of warning.

Daniel Jasper djasper at google.com
Sun Jul 20 23:06:39 PDT 2014


Author: djasper
Date: Mon Jul 21 01:06:38 2014
New Revision: 213501

URL: http://llvm.org/viewvc/llvm-project?rev=213501&view=rev
Log:
clang-tidy: [misc-use-override] Slightly tweak the wording of warning.

'final' should really be used with care.

Modified:
    clang-tools-extra/trunk/clang-tidy/misc/UseOverride.cpp

Modified: clang-tools-extra/trunk/clang-tidy/misc/UseOverride.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/UseOverride.cpp?rev=213501&r1=213500&r2=213501&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/UseOverride.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/UseOverride.cpp Mon Jul 21 01:06:38 2014
@@ -71,11 +71,11 @@ void UseOverride::check(const MatchFinde
   if (!OnlyVirtualSpecified && KeywordCount == 1)
     return; // Nothing to do.
 
-  DiagnosticBuilder Diag =
-      diag(Method->getLocation(),
-           OnlyVirtualSpecified
-               ? "Prefer using 'override' or 'final' instead of 'virtual'"
-               : "Use exactly one of 'virtual', 'override' and 'final'");
+  DiagnosticBuilder Diag = diag(
+      Method->getLocation(),
+      OnlyVirtualSpecified
+          ? "Prefer using 'override' or 'final' instead of 'virtual'"
+          : "Use exactly one of 'virtual', 'override' or (rarely) 'final'");
 
   CharSourceRange FileRange = Lexer::makeFileCharRange(
       CharSourceRange::getTokenRange(Method->getSourceRange()), Sources,





More information about the cfe-commits mailing list