[clang] [clang][Sema] Expand `#embed` in braced lists that initialize non-aggregates (PR #231938)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 21 15:06:17 PDT 2026
================
@@ -5955,8 +5960,7 @@ TryListConversion(Sema &S, InitListExpr *From, QualType ToType,
Result.Standard.setAsIdentityConversion();
Result.Standard.setFromType(InitTy);
Result.Standard.setAllToTypes(InitTy);
- for (unsigned i = 0; i < e; ++i) {
- Expr *Init = From->getInit(i);
+ for (Expr *Init : From->inits()) {
----------------
efriedma-quic wrote:
That explanation makes sense, but probably there should be a comment explaining this shortcut.
https://github.com/llvm/llvm-project/pull/231938
More information about the cfe-commits
mailing list