[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 14:00:18 PDT 2026


================
@@ -4532,7 +4531,8 @@ ExprResult TreeTransform<Derived>::TransformInitializer(Expr *Init,
   // If this was list initialization, revert to syntactic list form.
   if (Construct->isListInitialization())
     return getDerived().RebuildInitList(Construct->getBeginLoc(), NewArgs,
-                                        Construct->getEndLoc());
+                                        Construct->getEndLoc(),
+                                        /*IsExplicit=*/true);
----------------
bolshakov-a wrote:

Looks like the specific value is irrelevant because the constructed list is thrown away later.

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


More information about the cfe-commits mailing list