[clang-tools-extra] r298315 - [clang-tidy] Small cleanup. NFC.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 20 15:15:19 PDT 2017


Author: alexfh
Date: Mon Mar 20 17:15:19 2017
New Revision: 298315

URL: http://llvm.org/viewvc/llvm-project?rev=298315&view=rev
Log:
[clang-tidy] Small cleanup. NFC.

Modified:
    clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp

Modified: clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp?rev=298315&r1=298314&r2=298315&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp Mon Mar 20 17:15:19 2017
@@ -67,16 +67,10 @@ void DeleteNullPointerCheck::check(const
                                  *Result.SourceManager,
                                  Result.Context->getLangOpts())));
   if (Compound) {
-    Diag << FixItHint::CreateRemoval(CharSourceRange::getTokenRange(
-        Compound->getLBracLoc(),
-        Lexer::getLocForEndOfToken(Compound->getLBracLoc(), 0,
-                                   *Result.SourceManager,
-                                   Result.Context->getLangOpts())));
-    Diag << FixItHint::CreateRemoval(CharSourceRange::getTokenRange(
-        Compound->getRBracLoc(),
-        Lexer::getLocForEndOfToken(Compound->getRBracLoc(), 0,
-                                   *Result.SourceManager,
-                                   Result.Context->getLangOpts())));
+    Diag << FixItHint::CreateRemoval(
+        CharSourceRange::getTokenRange(Compound->getLBracLoc()));
+    Diag << FixItHint::CreateRemoval(
+        CharSourceRange::getTokenRange(Compound->getRBracLoc()));
   }
 }
 




More information about the cfe-commits mailing list