summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/bufferadd.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/bufferadd.cxx')
-rw-r--r--compilerplugins/clang/bufferadd.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/compilerplugins/clang/bufferadd.cxx b/compilerplugins/clang/bufferadd.cxx
index cf2b6a011b4a..8f58e46aba14 100644
--- a/compilerplugins/clang/bufferadd.cxx
+++ b/compilerplugins/clang/bufferadd.cxx
@@ -15,6 +15,8 @@
#include "plugin.hxx"
#include "check.hxx"
+#include "compat.hxx"
+#include "config_clang.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/StmtVisitor.h"
@@ -47,9 +49,11 @@ public:
// some false +
if (loplugin::isSamePathname(fn, SRCDIR "/unoidl/source/sourcetreeprovider.cxx"))
return false;
- if (loplugin::isSamePathname(fn, SRCDIR "/writerfilter/source/dmapper/StyleSheetTable.cxx"))
+ if (loplugin::isSamePathname(fn,
+ SRCDIR "/sw/source/writerfilter/dmapper/StyleSheetTable.cxx"))
return false;
- if (loplugin::isSamePathname(fn, SRCDIR "/writerfilter/source/dmapper/GraphicImport.cxx"))
+ if (loplugin::isSamePathname(fn,
+ SRCDIR "/sw/source/writerfilter/dmapper/GraphicImport.cxx"))
return false;
if (loplugin::isSamePathname(fn, SRCDIR "/sdext/source/pdfimport/pdfparse/pdfparse.cxx"))
return false;
@@ -65,7 +69,7 @@ public:
&& badMap.find(pair.first) == badMap.end())
report(DiagnosticsEngine::Warning,
"convert this append sequence into a *String + sequence",
- compat::getBeginLoc(pair.first))
+ pair.first->getBeginLoc())
<< pair.first->getSourceRange();
}
@@ -290,7 +294,7 @@ bool BufferAdd::isMethodOkToMerge(CXXMemberCallExpr const* memberCall)
Expr const* BufferAdd::ignore(Expr const* expr)
{
- return compat::IgnoreImplicit(compat::IgnoreImplicit(expr)->IgnoreParens());
+ return expr->IgnoreImplicit()->IgnoreParens()->IgnoreImplicit();
}
bool BufferAdd::isSideEffectFree(Expr const* expr)
@@ -343,7 +347,7 @@ bool BufferAdd::isSideEffectFree(Expr const* expr)
if (isSideEffectFree(callExpr->getArg(0)))
return true;
// allowlist some known-safe methods
- if (name.endswith("ResId") || name == "GetXMLToken")
+ if (compat::ends_with(name, "ResId") || name == "GetXMLToken")
if (isSideEffectFree(callExpr->getArg(0)))
return true;
}