[clang] [clang] fix sema init crash for not checking a ExprResult (PR #98102)
Yuxuan Chen via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 8 18:23:23 PDT 2024
================
@@ -5576,6 +5576,10 @@ static void TryOrBuildParenListInitialization(
ExprResult ER;
ER = IS.Perform(S, SubEntity, SubKind,
Arg ? MultiExprArg(Arg) : std::nullopt);
+
+ if (ER.IsInvalid())
+ return false;
+
if (InitExpr)
*InitExpr = ER.get();
----------------
yuxuanchen1997 wrote:
ER.get() is null if we don't apply this fix.
https://github.com/llvm/llvm-project/pull/98102
More information about the cfe-commits
mailing list