summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJason Rice <ricejasonf@gmail.com>2021-11-05 12:30:39 +0200
committerRaul Tambre <raul@tambre.ee>2021-11-06 10:06:38 +0200
commitb5aef90d4656c5188759d03e2c5c3dc3d8bb398b (patch)
treee9f3c7e806c2b500ea5bf7a3046f55b7a315db4f /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent39ead64e3f73045c7e0c72aed08c14b277828fb4 (diff)
[Clang] Fix instantiation of OpaqueValueExprs (Bug #45964)
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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions