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

Andrey Ali Khan Bolshakov via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 30 13:56:40 PDT 2026


================
@@ -8444,8 +8447,10 @@ ExprResult InitializationSequence::Perform(Sema &S,
     case SK_RewrapInitList: {
       Expr *E = CurInit.get();
       InitListExpr *Syntactic = Step->WrappingSyntacticList;
-      InitListExpr *ILE = new (S.Context) InitListExpr(S.Context,
-          Syntactic->getLBraceLoc(), E, Syntactic->getRBraceLoc());
+      assert(Syntactic->isExplicit());
----------------
bolshakov-a wrote:

I'm not completely sure this always holds. Should I replace it with copying of the `IsExplicit` state from `Syntactic` to `ILE`?

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


More information about the cfe-commits mailing list