================ @@ -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, ---------------- efriedma-quic wrote:
Doing it this way is O(N^2) in the number of fields. Can we just check if the initializer is an lvalue? It shouldn't be possible to have an lvalue as an operand to a compound literal unless it's binding to a reference. https://github.com/llvm/llvm-project/pull/221390 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
