summaryrefslogtreecommitdiffstats
path: root/compilerplugins/clang/emptyif.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/emptyif.cxx')
-rw-r--r--compilerplugins/clang/emptyif.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/compilerplugins/clang/emptyif.cxx b/compilerplugins/clang/emptyif.cxx
index ef7eac50d048..5412188f8d52 100644
--- a/compilerplugins/clang/emptyif.cxx
+++ b/compilerplugins/clang/emptyif.cxx
@@ -71,15 +71,14 @@ bool EmptyIf::VisitIfStmt(IfStmt const* ifStmt)
if (ifStmt->getElse() && empty(ifStmt->getElse()) && !ContainsComment(ifStmt->getElse()))
{
- report(DiagnosticsEngine::Warning, "empty else body",
- compat::getBeginLoc(ifStmt->getElse()))
+ report(DiagnosticsEngine::Warning, "empty else body", ifStmt->getElse()->getBeginLoc())
<< ifStmt->getElse()->getSourceRange();
return true;
}
if (!ifStmt->getElse() && empty(ifStmt->getThen()) && !ContainsComment(ifStmt->getThen()))
{
- report(DiagnosticsEngine::Warning, "empty if body", compat::getBeginLoc(ifStmt))
+ report(DiagnosticsEngine::Warning, "empty if body", ifStmt->getBeginLoc())
<< ifStmt->getSourceRange();
}