[clang] [clang][Sema] Expand `#embed` in braced lists that initialize non-aggregates (PR #231938)
Akash Manna via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 18 22:16:03 PDT 2026
================
@@ -13589,9 +13577,10 @@ QualType Sema::deduceVarTypeFromInitializer(VarDecl *VDecl,
InitsCopy);
}
+ SmallVector<Expr *, 8> ExpandedInits;
if (DirectInit) {
if (auto *IL = dyn_cast<InitListExpr>(Init))
- DeduceInits = IL->inits();
+ DeduceInits = getInitsWithEmbedExpanded(IL, ExpandedInits);
----------------
akash-manna-sky wrote:
Dropped the expansion there and in the `auto{}` / `new auto{}` siblings. The deduced `int` is then rejected by the scalar list-initialization check.
https://github.com/llvm/llvm-project/pull/231938
More information about the cfe-commits
mailing list