diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx index 2b39525bc9ba..4ef254746a96 100644 --- a/compilerplugins/clang/implicitboolconversion.cxx +++ b/compilerplugins/clang/implicitboolconversion.cxx @@ -241,7 +241,15 @@ public: FilteringPlugin(data) {} virtual void run() override - { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + { + std::string fn(handler.getMainFileName()); + loplugin::normalizeDotDotInFilePath(fn); + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/soltools/cpp") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/soltools/mkdepend")) + return; + + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } bool TraverseCallExpr(CallExpr * expr); diff --git a/compilerplugins/clang/pointerbool.cxx b/compilerplugins/clang/pointerbool.cxx index 6225286a3dff..f5c2dfd4951b 100644 --- a/compilerplugins/clang/pointerbool.cxx +++ b/compilerplugins/clang/pointerbool.cxx @@ -78,6 +78,12 @@ bool PointerBool::TraverseFunctionDecl(FunctionDecl* decl) bool PointerBool::VisitCallExpr(CallExpr const* callExpr) { + std::string fn(handler.getMainFileName()); + loplugin::normalizeDotDotInFilePath(fn); + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/soltools/cpp") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/soltools/mkdepend")) + return true; + if (ignoreLocation(callExpr)) return true; // TODO this doesn't currently work, the args and the params don't seem to line up