================ @@ -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:
It would be superfluous if not for the part about struct initialization. To me that is really not very obvious. When possible I think it's very useful to comment **why** the code is doing something. All too often I come across code where I understand what it's doing but I understand **why**. So I would prefer to keep it. If you prefer I could only keep the bit about struct initialization. https://github.com/llvm/llvm-project/pull/106321 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits