compilerplugins/clang/ostr.cxx |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

New commits:
commit e14928b14847bb715f89d161a98cd3b8764f9944
Author:     Michael Stahl <[email protected]>
AuthorDate: Thu Nov 21 17:37:02 2024 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 22 10:43:59 2024 +0100

    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 <[email protected]>
    Tested-by: Jenkins

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()))
         {

Reply via email to