================
@@ -8207,6 +8207,14 @@ ExprResult InitializationSequence::Perform(Sema &S,
Kind.getRange().getEnd());
} else {
CurInit = new (S.Context) ImplicitValueInitExpr(Step->Type);
+ // Note the return value isn't used to return early
+ // to preserve the AST as best as possible even though an error
+ // might have occurred. For struct initialization it also allows
+ // all field assignments to be checked rather than bailing on the
+ // first error.
----------------
delcypher wrote:
I've changed the comments to just be.
```
// Note the return value isn't used to return a ExprError() when
// initialization fails . For struct initialization allows all field
// assignments to be checked rather than bailing on the first error.
```
which only discusses the non-obvious part of the original comment.
I'm going to mark this as resolved but please re-open if you want to discuss
this more.
https://github.com/llvm/llvm-project/pull/106321
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits