Kaydet (Commit) fa443144 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 740ef202
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment