================ @@ -7449,6 +7449,31 @@ Sema::ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty, return BuildCompoundLiteralExpr(LParenLoc, TInfo, RParenLoc, InitExpr); } +/// Whether the \p Index-th element of the semantic form of \p ILE initializes +/// a reference member, so that its initializer is a glvalue that binds. +static bool initializesReferenceMember(const InitListExpr *ILE, ---------------- akash-manna-sky wrote:
Done, it's just `Init->isGLValue()` now. The one lvalue operand that isn't a reference binding is a string literal (or `@encode`) initializing an array element, so that case is excluded; otherwise CodeGen would emit a pointer where the array contents belong. Added both string-literal shapes to the test. https://github.com/llvm/llvm-project/pull/221390 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
