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

Stephan Bergmann sbergman at redhat.com
Sun Oct 9 14:26:31 UTC 2016


 compilerplugins/clang/fpcomparison.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e492d7bcd1a6f624b2d0eea14c4bf0872164e533
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Oct 9 16:23:49 2016 +0200

    loplugin:fpcomparison, macOS redux
    
    Change-Id: Ie41be540209b4af7c0571f7c16bedd0665daff10

diff --git a/compilerplugins/clang/fpcomparison.cxx b/compilerplugins/clang/fpcomparison.cxx
index cdf895d..00dff67 100644
--- a/compilerplugins/clang/fpcomparison.cxx
+++ b/compilerplugins/clang/fpcomparison.cxx
@@ -30,6 +30,8 @@ public:
 
     virtual void run() override
     {
+        vclFloatDevicePixel = compiler.getPreprocessor()
+            .getIdentifierInfo("VCL_FLOAT_DEVICE_PIXEL")->hasMacroDefinition();
         TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
     }
 
@@ -40,6 +42,7 @@ private:
     bool ignore(FunctionDecl* );
     enum class EState { None, TraverseProcess, TraverseIgnore };
     EState meState = EState::None;
+    bool vclFloatDevicePixel;
 };
 
 bool FpComparison::TraverseFunctionDecl(FunctionDecl* function)
@@ -315,7 +318,10 @@ bool FpComparison::ignore(FunctionDecl* function)
         || dc.Function("testTitleManualLayoutXLSX").Class("Chart2ExportTest").GlobalNamespace()
         || dc.Function("testPlotAreaManualLayoutXLSX").Class("Chart2ExportTest").GlobalNamespace()
         || dc.Function("testLegendManualLayoutXLSX").Class("Chart2ExportTest").GlobalNamespace()
-    )
+        || dc.Function("SetScreenNumber").Class("AquaSalFrame").GlobalNamespace()
+        || (vclFloatDevicePixel
+            && (dc.Function("Justify").Class("GenericSalLayout").GlobalNamespace()
+                || dc.Function("AdjustLayout").Class("MultiSalLayout").GlobalNamespace())))
     {
         return true;
     }


More information about the Libreoffice-commits mailing list