summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
index e259b6bfeb1..5f055d106b2 100644
--- a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
@@ -884,7 +884,7 @@ void RedundantExpressionCheck::checkBitwiseExpr(
if (exprEvaluatesToZero(Opcode, Value)) {
diag(Loc, "expression always evaluates to 0");
} else if (exprEvaluatesToBitwiseNegatedZero(Opcode, Value)) {
- SourceRange ConstExprRange(ConstExpr->getLocStart(),
+ SourceRange ConstExprRange(ConstExpr->getBeginLoc(),
ConstExpr->getLocEnd());
StringRef ConstExprText = Lexer::getSourceText(
CharSourceRange::getTokenRange(ConstExprRange), *Result.SourceManager,
@@ -893,7 +893,7 @@ void RedundantExpressionCheck::checkBitwiseExpr(
diag(Loc, "expression always evaluates to '%0'") << ConstExprText;
} else if (exprEvaluatesToSymbolic(Opcode, Value)) {
- SourceRange SymExprRange(Sym->getLocStart(), Sym->getLocEnd());
+ SourceRange SymExprRange(Sym->getBeginLoc(), Sym->getLocEnd());
StringRef ExprText = Lexer::getSourceText(
CharSourceRange::getTokenRange(SymExprRange), *Result.SourceManager,
OpenPOWER on IntegriCloud