summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-11-21 17:37:02 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2024-11-22 10:43:59 +0100
commite14928b14847bb715f89d161a98cd3b8764f9944 (patch)
treeb7ac1e14fcb5f954322ecb7585653385cb6588dc
parent7d7d3afcf6ac45111e3a023e88d68ab27fcd2409 (diff)
compilerplugins: try to disable ostr plugin for tests using assertXPath
... on release branch. Change-Id: Ibd22c1e12d4566b153887627758ed6d5e19a5f79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176951 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
-rw-r--r--compilerplugins/clang/ostr.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/compilerplugins/clang/ostr.cxx b/compilerplugins/clang/ostr.cxx
index 189b74da3152..e8e32ed535ea 100644
--- a/compilerplugins/clang/ostr.cxx
+++ b/compilerplugins/clang/ostr.cxx
@@ -37,6 +37,32 @@ public:
void run() override
{
+ std::string fn(handler.getMainFileName());
+ loplugin::normalizeDotDotInFilePath(fn);
+ if (loplugin::hasPathnamePrefix(fn, SRCDIR "/chart2/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/embeddedobj/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/emfio/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/extensions/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/filter/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/oox/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/package/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/sc/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/sd/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/sdext/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/sfx2/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/starmath/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/svgio/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/writerperfect/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/xmloff/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/xmlscript/qa/")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/xmlsecurity/qa/"))
+ {
+ return; // ignore unit tests in release branch
+ }
+
if (compiler.getLangOpts().CPlusPlus
&& TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()))
{