From e492d7bcd1a6f624b2d0eea14c4bf0872164e533 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 9 Oct 2016 16:23:49 +0200 Subject: loplugin:fpcomparison, macOS redux Change-Id: Ie41be540209b4af7c0571f7c16bedd0665daff10 --- compilerplugins/clang/fpcomparison.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compilerplugins/clang/fpcomparison.cxx b/compilerplugins/clang/fpcomparison.cxx index cdf895d1dfce..00dff6736027 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; } -- cgit