[clang] [clang-tools-extra] [clang] Make `InitListExpr::isExplicit()` work (PR #195175)

Andrey Ali Khan Bolshakov via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 07:56:36 PDT 2026


================
@@ -640,7 +641,8 @@ ExprResult InitListChecker::PerformEmptyInit(SourceLocation Loc,
     // the initializer list where possible.
     InitExpr = VerifyOnly ? &DummyInitList
                           : new (SemaRef.Context)
-                                InitListExpr(SemaRef.Context, Loc, {}, Loc);
+                                InitListExpr(SemaRef.Context, Loc, {}, Loc,
+                                             /*isExplicit=*/false);
----------------
bolshakov-a wrote:

No, it is for value-initialization of parts of an aggregate skipped in its (i.e. outer) init-list. Explicitly written init-lists are handled in `ActOnInitList`.

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


More information about the cfe-commits mailing list