[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 11:15:08 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())
----------------
erichkeane wrote:

For `ExprResult`, I tend to find `isUsable` to be more clear, and I thought is slightly more strict, as it also catches cases where the ER is unset.  That said, we use `isInvalid` all over the place, assuming that it would have been set to SOMETHING.

https://github.com/llvm/llvm-project/pull/98102


More information about the cfe-commits mailing list