diff options
Diffstat (limited to 'compilerplugins/clang/stringstatic.cxx')
-rw-r--r-- | compilerplugins/clang/stringstatic.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compilerplugins/clang/stringstatic.cxx b/compilerplugins/clang/stringstatic.cxx index a6b5b7d2e8fe..a0b83c465235 100644 --- a/compilerplugins/clang/stringstatic.cxx +++ b/compilerplugins/clang/stringstatic.cxx @@ -10,9 +10,10 @@ #ifndef LO_CLANG_SHARED_PLUGINS #include "check.hxx" -#include "compat.hxx" #include "plugin.hxx" +#include "config_clang.h" + #include <unordered_set> /** Look for static O*String and O*String[], they can be more efficiently declared as: @@ -109,7 +110,7 @@ bool StringStatic::VisitVarDecl(VarDecl const* varDecl) expr = castExpr->getSubExpr(); } else if (MaterializeTemporaryExpr const * materializeExpr = dyn_cast<MaterializeTemporaryExpr>(expr)) { - expr = compat::getSubExpr(materializeExpr); + expr = materializeExpr->getSubExpr(); } else if (CXXBindTemporaryExpr const * bindExpr = dyn_cast<CXXBindTemporaryExpr>(expr)) { expr = bindExpr->getSubExpr(); @@ -161,7 +162,7 @@ bool StringStatic::VisitDeclRefExpr(DeclRefExpr const * declRef) return true; // ignore globals that are used in CPPUNIT_ASSERT expressions, otherwise we can end up // trying to compare an OUStringLiteral and an OUString, and CPPUNIT can't handle that - auto loc = compat::getBeginLoc(declRef); + auto loc = declRef->getBeginLoc(); if (compiler.getSourceManager().isMacroArgExpansion(loc)) { StringRef name { Lexer::getImmediateMacroName(loc, compiler.getSourceManager(), compiler.getLangOpts()) }; |