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

Stephan Bergmann sbergman at redhat.com
Fri Sep 29 14:39:31 UTC 2017


 compilerplugins/clang/dllmacro.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit fa4431449d0306e8179f53a2a69c549800bd24bd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Sep 29 16:33:45 2017 +0200

    Avoid bogus loplugin:dllmacro "unnecessary *DLLPUBLIC declaration ..."
    
    ...about the definition of __cxxabiv1::__cxa_exception in
    bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx, when a declaration of that
    struct has already been seen in /usr/include/c++/7/cxxabi.h in a
    
      #pragma GCC visibility push(default)
      ...
      #pragma GCC visibility pop
    
    block (so that decl->getAttr<VisibilityAttr>() would point at the first of those
    two pragmas).
    
    Change-Id: I4af56be8ce84ace57a809a09da5c44d86fc4237a

diff --git a/compilerplugins/clang/dllmacro.cxx b/compilerplugins/clang/dllmacro.cxx
index 538203f88942..66664888419c 100644
--- a/compilerplugins/clang/dllmacro.cxx
+++ b/compilerplugins/clang/dllmacro.cxx
@@ -76,7 +76,8 @@ bool DllMacro::VisitNamedDecl(NamedDecl const * decl) {
                 << p->getSourceRange();
         }
     }
-    else if (a->getVisibility() == VisibilityAttr::Default) {
+    else if (a->getVisibility() == VisibilityAttr::Default && !a->isInherited())
+    {
         auto p = dyn_cast<CXXRecordDecl>(decl);
         if (p && p->isCompleteDefinition() && !p->getDescribedClassTemplate()) {
             // don't know what these macros mean, leave them alone


More information about the Libreoffice-commits mailing list