alexfh added inline comments.

================
Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:252
@@ -251,1 +251,3 @@
             // A "virtual near miss" is found.
+            auto Range = CharSourceRange::getTokenRange(SourceRange(
+                DerivedMD->getLocation(), DerivedMD->getLocation()));
----------------
There are two ways to make it shorter:
  * use the `getTokenRange` overload for `SourceLocation`s: 
`CharSourceRange::getTokenRange(DerivedMD->getLocation(), 
DerivedMD->getLocation());`;
  * use the `SourceRange` constructor accepting a single location: 
`CharSourceRange::getTokenRange(SourceRange(DerivedMD->getLocation()));`.

Choose whatever you like more ;)

================
Comment at: test/clang-tidy/misc-virtual-near-miss.cpp:1
@@ -1,2 +1,2 @@
 // RUN: %check_clang_tidy %s misc-virtual-near-miss %t
 
----------------
Please add a test ensuring replacements are applied correctly in templates with 
multiple instantiations and in macros.


http://reviews.llvm.org/D16922



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to