[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann sbergman at redhat.com
Tue Aug 16 07:17:16 UTC 2016


 compilerplugins/clang/stringstatic.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 63d94a6c507015b2094e4f16f2b7b5b3a6015d20
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Aug 16 09:16:28 2016 +0200

    Fix check for aMinusSign in chart2/inc/SpecialUnicodes.hxx
    
    Change-Id: I15e344874d90cc38acb219e7c07579d68af89043

diff --git a/compilerplugins/clang/stringstatic.cxx b/compilerplugins/clang/stringstatic.cxx
index ec7b3b0..4ddac65 100644
--- a/compilerplugins/clang/stringstatic.cxx
+++ b/compilerplugins/clang/stringstatic.cxx
@@ -47,9 +47,6 @@ void StringStatic::run()
     // has a mix of literals and and refs to external OUStrings
     if (fn == SRCDIR "/ucb/source/ucp/webdav-neon/ContentProperties.cxx")
          return;
-    // we could use OUStringLiteral1 here, but we'd need to update OUStringLiteral1 to allow BMP chars first
-    if (fn == SRCDIR "/include/chart2/SpecialUnicodes.hxx")
-         return;
 
     TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 
@@ -69,6 +66,12 @@ bool StringStatic::VisitVarDecl(VarDecl const* varDecl)
     if (ignoreLocation(varDecl)) {
         return true;
     }
+    // We could use OUStringLiteral1 here, but we'd need to update OUStringLiteral1 to allow BMP chars first:
+    if (compiler.getSourceManager().getFilename(varDecl->getLocation())
+        == SRCDIR "/chart2/inc/SpecialUnicodes.hxx")
+    {
+        return true;
+    }
 
     QualType qt = varDecl->getType();
     if (!varDecl->hasGlobalStorage()


More information about the Libreoffice-commits mailing list