compilerplugins/clang/dllprivate.cxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
New commits: commit 075489b4b810692edc2ba9910eb3ca659a2b6745 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Sep 20 10:31:21 2016 +0200 Adapt loplugin:dllprivate to DISABLE_DYNLOADING Change-Id: I721cfeaa144c773ead457e1c9138009d4071a06a diff --git a/compilerplugins/clang/dllprivate.cxx b/compilerplugins/clang/dllprivate.cxx index 1acb710..d94ac3a 100644 --- a/compilerplugins/clang/dllprivate.cxx +++ b/compilerplugins/clang/dllprivate.cxx @@ -57,8 +57,19 @@ public: } private: - void run() override - { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + void run() override { + // DISABLE_DYNLOADING makes SAL_DLLPUBLIC_{EXPORT,IMPORT,TEMPLAT} expand + // to visibility("hidden") attributes, which would cause bogus warnings + // here (e.g., in UBSan builds that explicitly define DISBALE_DYNLOADING + // in jurt/source/pipe/staticsalhack.cxx); alternatively, change + // include/sal/types.h to make those SAL_DLLPUBLIC_* expand to nothing + // for DISABLE_DYNLOADING: + if (!compiler.getPreprocessor().getIdentifierInfo("DISABLE_DYNLOADING") + ->hasMacroDefinition()) + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } }; static loplugin::Plugin::Registration<Visitor> reg("dllprivate"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits