[PATCH] D18396: Clang-tidy:modernize-use-override. Fix for __declspec attributes and const=0 without spacse
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 23 09:34:27 PDT 2016
alexfh added a comment.
Thank you for the patch!
Looks good in general. A few nits.
================
Comment at: clang-tidy/modernize/UseOverrideCheck.cpp:125
@@ -124,1 +124,3 @@
+ if (T.is(tok::kw___attribute) &&
+ !(Sources.isBeforeInTranslationUnit(T.getLocation(), MethodLoc))) {
InsertLoc = T.getLocation();
----------------
nit: no need for the parentheses around the function call.
================
Comment at: clang-tidy/modernize/UseOverrideCheck.cpp:136
@@ -133,3 +135,3 @@
Sources.getExpansionLoc(A->getRange().getBegin());
- if (!InsertLoc.isValid() ||
- Sources.isBeforeInTranslationUnit(Loc, InsertLoc))
+ if ((!InsertLoc.isValid() ||
+ Sources.isBeforeInTranslationUnit(Loc, InsertLoc)) &&
----------------
Please clang-format this change.
================
Comment at: test/clang-tidy/modernize-use-override-ms.cpp:1
@@ +1,2 @@
+// RUN: %check_clang_tidy %s modernize-use-override %t
+
----------------
Does this test pass on linux? If no additional compiler arguments needed and it just works, maybe just merge this test code to the main test file?
http://reviews.llvm.org/D18396
More information about the cfe-commits
mailing list