Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing warning on the visibility of bases and members #13381

Open
llvmbot opened this issue Jun 1, 2012 · 0 comments
Open

Missing warning on the visibility of bases and members #13381

llvmbot opened this issue Jun 1, 2012 · 0 comments
Labels
bugzilla Issues migrated from bugzilla c++ clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 1, 2012

Bugzilla Link 13009
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@ftynse

Extended Description

Newer gccs produce a warning in

struct __attribute__((visibility("hidden"))) foo {
};
struct bar {
  foo x; // bar has default visibility, but foo is hidden
};
struct zed : public foo { // zed has default visibility, but foo is hidden
};

I think it is a reasonable warning because

  • If the type has a hidden member or base, that member or base was created locally (in the same DSO), so the type could also be hidden.
  • If there is something strange going on, the warning is really easy to avoid, just make the visibility of bar and zed explicit.
@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@philnik777 philnik777 added the clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer label Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++ clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
Projects
None yet
Development

No branches or pull requests

2 participants