summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/sequentialassign.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/sequentialassign.cxx')
-rw-r--r--compilerplugins/clang/sequentialassign.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/compilerplugins/clang/sequentialassign.cxx b/compilerplugins/clang/sequentialassign.cxx
index a89afea43438..01172df17eb1 100644
--- a/compilerplugins/clang/sequentialassign.cxx
+++ b/compilerplugins/clang/sequentialassign.cxx
@@ -15,6 +15,7 @@
#include "plugin.hxx"
#include "check.hxx"
+#include "config_clang.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/StmtVisitor.h"
@@ -205,8 +206,7 @@ void SequentialAssign::checkForSecondAssign(Stmt const* stmt, VarDecl const* var
if (declRefExprLHS->getDecl() == varDecl)
{
report(DiagnosticsEngine::Warning,
- "simplify by merging with the preceding assignment",
- compat::getBeginLoc(stmt))
+ "simplify by merging with the preceding assignment", stmt->getBeginLoc())
<< stmt->getSourceRange();
}
}
@@ -221,8 +221,7 @@ void SequentialAssign::checkForSecondAssign(Stmt const* stmt, VarDecl const* var
if (declRefExpr->getDecl() == varDecl)
{
report(DiagnosticsEngine::Warning,
- "simplify by merging with the preceding assignment",
- compat::getBeginLoc(stmt))
+ "simplify by merging with the preceding assignment", stmt->getBeginLoc())
<< stmt->getSourceRange();
}
}