[clang] [clang] fix sema init crash for not checking a ExprResult (PR #98102)
Yuxuan Chen via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 9 14:13:20 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())
----------------
yuxuanchen1997 wrote:
If you look at `InitializationSequence::Perform` (this function is 1000 lines long), it first checks `Failed()` then proceed to build a whole bunch of things. There are a couple of places it returned `ExprError`. I think it's possible to still be invalid after `!Failed()`.
https://github.com/llvm/llvm-project/pull/98102
More information about the cfe-commits
mailing list