summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2017-03-20 22:15:19 +0000
committerAlexander Kornienko <alexfh@google.com>2017-03-20 22:15:19 +0000
commit9bf7037ccdeac0d9949ded66e2d9ce77a4ebbb8e (patch)
tree8f782ec6d7c8b5f24e22e6c5f2639797b50c41fb
parent35d75aeda29ede36e187d8b6f6fca0e1ed7569a8 (diff)
downloadbcm5719-llvm-9bf7037ccdeac0d9949ded66e2d9ce77a4ebbb8e.tar.gz
bcm5719-llvm-9bf7037ccdeac0d9949ded66e2d9ce77a4ebbb8e.zip
[clang-tidy] Small cleanup. NFC.
llvm-svn: 298315
-rw-r--r--clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.cpp b/clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.cpp
index 72aa5ef2e3e..766dfdacb8a 100644
--- a/clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.cpp
@@ -67,16 +67,10 @@ void DeleteNullPointerCheck::check(const MatchFinder::MatchResult &Result) {
*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()));
}
}
OpenPOWER on IntegriCloud