[clang] [clang] Fix assertion failure in constexpr union deserialization (PR #140179)
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Fri May 16 04:22:30 PDT 2025
================
@@ -414,7 +414,7 @@ let Class = PropertyTypeCase<APValue, "Union"> in {
let Read = [{ node.getUnionValue() }];
}
def : Creator<[{
- return APValue(cast<clang::FieldDecl>(fieldDecl), std::move(value));
+ return APValue(cast_if_present<clang::FieldDecl>(fieldDecl), std::move(value));
----------------
alexfh wrote:
Sorry to make you reconstruct this explanation yourself @hokein. Added a comment.
https://github.com/llvm/llvm-project/pull/140179
More information about the cfe-commits
mailing list