diff options
Diffstat (limited to 'compilerplugins/clang/colorcheck.cxx')
-rw-r--r-- | compilerplugins/clang/colorcheck.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compilerplugins/clang/colorcheck.cxx b/compilerplugins/clang/colorcheck.cxx index 83f9a9688381..69bcaa0cd9cc 100644 --- a/compilerplugins/clang/colorcheck.cxx +++ b/compilerplugins/clang/colorcheck.cxx @@ -15,7 +15,10 @@ #include <fstream> #include <set> +#include "config_clang.h" + #include "check.hxx" +#include "compat.hxx" #include "plugin.hxx" /** @@ -53,7 +56,7 @@ bool ColorCheck::VisitCXXConstructExpr(const CXXConstructExpr* constructExpr) return true; StringRef aFileName = getFilenameOfLocation( - compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(constructExpr))); + compiler.getSourceManager().getSpellingLoc(constructExpr->getBeginLoc())); if (loplugin::isSamePathname(aFileName, SRCDIR "/include/tools/color.hxx")) return true; @@ -70,8 +73,8 @@ bool ColorCheck::VisitCXXConstructExpr(const CXXConstructExpr* constructExpr) { if (!arg0->isValueDependent()) { - llvm::Optional<llvm::APSInt> xVal - = compat::getIntegerConstantExpr(arg0, compiler.getASTContext()); + compat::optional<llvm::APSInt> xVal + = arg0->getIntegerConstantExpr(compiler.getASTContext()); if (xVal && *xVal > 0xffffff) report(DiagnosticsEngine::Warning, "Rather use the ColorTransparency or ColorAlpha version of this constructor", |