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
Clang 10 (trunk) crashed (Godbolt link inside) #45964
Labels
bugzilla
Issues migrated from bugzilla
c++17
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash-on-invalid
Comments
feilongfl
pushed a commit
to feilongfl/llvm-project
that referenced
this issue
Dec 13, 2021
The structured bindings decomposition of a non-dependent array in a dependent context (a template) were, upon instantiation, creating nested OpaqueValueExprs that would trigger assertions in CodeGen. Additionally the OpaqueValuesExpr's contained SourceExpr is being emitted in CodeGen, but there was no code for its transform in template instantiation. This would trigger other assertions such as when emitting a DeclRefExpr that refers to a VarDecl that is not marked as ODR-used. This is all based on cursory deduction, but with the way the code flows from SemaTemplateInstantiate back to SemaInit, it is apparent that the nesting of OpaqueValueExpr is unintentional. This commit fixes https://bugs.llvm.org/show_bug.cgi?id=45964 and possible other issues involving OpaqueValueExprs in template instantiations might be resolved. Reviewed By: aaron.ballman, rjmccall Differential Revision: https://reviews.llvm.org/D108482
This was fixed before 14.0.0 for reference code
dump
|
EugeneZelenko
added
the
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
label
Jun 30, 2023
@llvm/issue-subscribers-clang-frontend |
ricejasonf
added a commit
to ricejasonf/llvm-project
that referenced
this issue
Dec 27, 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++17
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash-on-invalid
Extended Description
Godbolt shows a clang 10 stacktrace for the following code:
https://godbolt.org/z/8az9zC
I wanted to build a template helper to transform a std::variant of the form
std::variant<type_tag<A>, type_tag<B>, ...>
into:
std::variant<A, B, ...>
.
The text was updated successfully, but these errors were encountered: