summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/stringloop.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/stringloop.cxx')
-rw-r--r--compilerplugins/clang/stringloop.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/compilerplugins/clang/stringloop.cxx b/compilerplugins/clang/stringloop.cxx
index cb3ad327738f..3bae1a225b1e 100644
--- a/compilerplugins/clang/stringloop.cxx
+++ b/compilerplugins/clang/stringloop.cxx
@@ -9,6 +9,7 @@
#include "check.hxx"
#include "plugin.hxx"
+#include "config_clang.h"
#include <vector>
/** Look for OUString/OString being appended to inside a loop, where OUStringBuffer/OStringBuffer would be a better idea
@@ -256,9 +257,9 @@ bool StringLoop::VisitCallExpr(CallExpr const* callExpr)
return true;
report(DiagnosticsEngine::Warning,
"appending to OUString in loop, rather use OUStringBuffer",
- compat::getBeginLoc(operatorCallExpr))
+ operatorCallExpr->getBeginLoc())
<< operatorCallExpr->getSourceRange();
- report(DiagnosticsEngine::Note, "field here", compat::getBeginLoc(fieldDecl))
+ report(DiagnosticsEngine::Note, "field here", fieldDecl->getBeginLoc())
<< fieldDecl->getSourceRange();
}
else if (auto declRefExpr = dyn_cast<DeclRefExpr>(callExpr->getArg(0)))
@@ -275,9 +276,9 @@ bool StringLoop::VisitCallExpr(CallExpr const* callExpr)
return true;
report(DiagnosticsEngine::Warning,
"appending to OUString in loop, rather use OUStringBuffer",
- compat::getBeginLoc(operatorCallExpr))
+ operatorCallExpr->getBeginLoc())
<< operatorCallExpr->getSourceRange();
- report(DiagnosticsEngine::Note, "var here", compat::getBeginLoc(varDecl))
+ report(DiagnosticsEngine::Note, "var here", varDecl->getBeginLoc())
<< varDecl->getSourceRange();
}
}