diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc')
5 files changed, 7 insertions, 7 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp index 5f055d106b2..e9b0f4d0c58 100644 --- a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp @@ -885,7 +885,7 @@ void RedundantExpressionCheck::checkBitwiseExpr( diag(Loc, "expression always evaluates to 0"); } else if (exprEvaluatesToBitwiseNegatedZero(Opcode, Value)) { SourceRange ConstExprRange(ConstExpr->getBeginLoc(), - ConstExpr->getLocEnd()); + ConstExpr->getEndLoc()); StringRef ConstExprText = Lexer::getSourceText( CharSourceRange::getTokenRange(ConstExprRange), *Result.SourceManager, Result.Context->getLangOpts()); @@ -893,7 +893,7 @@ void RedundantExpressionCheck::checkBitwiseExpr( diag(Loc, "expression always evaluates to '%0'") << ConstExprText; } else if (exprEvaluatesToSymbolic(Opcode, Value)) { - SourceRange SymExprRange(Sym->getBeginLoc(), Sym->getLocEnd()); + SourceRange SymExprRange(Sym->getBeginLoc(), Sym->getEndLoc()); StringRef ExprText = Lexer::getSourceText( CharSourceRange::getTokenRange(SymExprRange), *Result.SourceManager, diff --git a/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp b/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp index 1d0d88d248e..583ed7add6e 100644 --- a/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp @@ -129,7 +129,7 @@ void StaticAssertCheck::check(const MatchFinder::MatchResult &Result) { FixItHints.push_back(FixItHint::CreateRemoval( SourceRange(AssertExprRoot->getOperatorLoc()))); FixItHints.push_back(FixItHint::CreateRemoval( - SourceRange(AssertMSG->getBeginLoc(), AssertMSG->getLocEnd()))); + SourceRange(AssertMSG->getBeginLoc(), AssertMSG->getEndLoc()))); StaticAssertMSG = (Twine(", \"") + AssertMSG->getString() + "\"").str(); } diff --git a/clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.cpp b/clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.cpp index 3ef5b205fdc..4beb4320e9e 100644 --- a/clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.cpp @@ -36,7 +36,7 @@ void UnusedAliasDeclsCheck::check(const MatchFinder::MatchResult &Result) { FoundDecls[AliasDecl] = CharSourceRange::getCharRange( AliasDecl->getBeginLoc(), Lexer::findLocationAfterToken( - AliasDecl->getLocEnd(), tok::semi, *Result.SourceManager, + AliasDecl->getEndLoc(), tok::semi, *Result.SourceManager, getLangOpts(), /*SkipTrailingWhitespaceAndNewLine=*/true)); return; diff --git a/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp b/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp index a5dae816fc4..a70a53ead96 100644 --- a/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp @@ -46,10 +46,10 @@ static CharSourceRange removeNode(const MatchFinder::MatchResult &Result, if (PrevNode) return CharSourceRange::getTokenRange( - Lexer::getLocForEndOfToken(PrevNode->getLocEnd(), 0, + Lexer::getLocForEndOfToken(PrevNode->getEndLoc(), 0, *Result.SourceManager, Result.Context->getLangOpts()), - Node->getLocEnd()); + Node->getEndLoc()); return CharSourceRange::getTokenRange(Node->getSourceRange()); } diff --git a/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp b/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp index da2704711b6..48009b5a53c 100644 --- a/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp @@ -70,7 +70,7 @@ void UnusedUsingDeclsCheck::check(const MatchFinder::MatchResult &Result) { Context.UsingDeclRange = CharSourceRange::getCharRange( Using->getBeginLoc(), Lexer::findLocationAfterToken( - Using->getLocEnd(), tok::semi, *Result.SourceManager, getLangOpts(), + Using->getEndLoc(), tok::semi, *Result.SourceManager, getLangOpts(), /*SkipTrailingWhitespaceAndNewLine=*/true)); for (const auto *UsingShadow : Using->shadows()) { const auto *TargetDecl = UsingShadow->getTargetDecl()->getCanonicalDecl(); |