Skip to content

Commit 01a5dd6

Browse files
[clang] fix sema init crash for not checking a ExprResult
1 parent 673b6cd commit 01a5dd6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/Sema/SemaInit.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5576,6 +5576,10 @@ static void TryOrBuildParenListInitialization(
55765576
ExprResult ER;
55775577
ER = IS.Perform(S, SubEntity, SubKind,
55785578
Arg ? MultiExprArg(Arg) : std::nullopt);
5579+
5580+
if (ER.isInvalid())
5581+
return false;
5582+
55795583
if (InitExpr)
55805584
*InitExpr = ER.get();
55815585
else

0 commit comments

Comments
 (0)