[PATCH] D12081: Add use-nullptr check to clang-tidy.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 06:08:26 PDT 2015


alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

Looks good! I'll fix the last issue (see the comment below) and commit the patch for you.


================
Comment at: clang-tidy/modernize/UseNullptrCheck.cpp:80
@@ +79,3 @@
+  bool NeedsSpace =
+      isAlphanumeric(*FullSourceLoc(PreviousLocation, SM).getCharacterData());
+  Check.diag(Range.getBegin(), "use nullptr") << FixItHint::CreateReplacement(
----------------
`FullSourceLoc` makes things more complicated here, `SM.getCharacterData(PreviousLocation)` would be better and shorter.


http://reviews.llvm.org/D12081





More information about the cfe-commits mailing list