summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp b/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
index a29e68a368d..5f5294c2c22 100644
--- a/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
@@ -177,9 +177,9 @@ BracesAroundStatementsCheck::findRParenLoc(const IfOrWhileStmt *S,
if (S->getBeginLoc().isMacroID())
return SourceLocation();
- SourceLocation CondEndLoc = S->getCond()->getLocEnd();
+ SourceLocation CondEndLoc = S->getCond()->getEndLoc();
if (const DeclStmt *CondVar = S->getConditionVariableDeclStmt())
- CondEndLoc = CondVar->getLocEnd();
+ CondEndLoc = CondVar->getEndLoc();
if (!CondEndLoc.isValid()) {
return SourceLocation();
OpenPOWER on IntegriCloud