-
Notifications
You must be signed in to change notification settings - Fork 13.5k
crash after hiding of class-scope using shadow declaration in a template #47028
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
Labels
bugzilla
Issues migrated from bugzilla
c++
clang:codegen
IR generation bugs: mangling, exceptions, etc.
confirmed
Verified by a second party
crash-on-valid
Comments
This still crashes on post 16 trunk(ba7cc56) It compiles fine with gcc 13.1 The crash gives the message
The full dump is
|
@llvm/issue-subscribers-clang-codegen |
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:codegen
IR generation bugs: mangling, exceptions, etc.
confirmed
Verified by a second party
crash-on-valid
Extended Description
Testcase causes a broken AST and a crash in IR generation:
The problem is that we inject a using shadow declaration for 'using A::f', and then try to retroactively remove it (after it was already used) when we see the later declaration of the member 'void f()'. Then during template instantiation, we don't instantiate the using-shadow declaration (it was already removed), so the '&B::f' has nothing to refer to.
Perhaps the best thing to do would be to reject any case where the UsingShadowDecl is referenced before being hidden (on the basis that this is a "reordering the declarations changes the meaning of the class" case).
The text was updated successfully, but these errors were encountered: