[clang] [clang] Fix assertion failure in constexpr union deserialization (PR #140179)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 16 02:46:02 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));
----------------
cor3ntin wrote:
It might be worth adding a comment in the code
https://github.com/llvm/llvm-project/pull/140179
More information about the cfe-commits
mailing list