[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 2 09:26:11 PDT 2022


cor3ntin added a comment.

I think this is basically good to go, but I'll let other people give it a look too



================
Comment at: clang/lib/AST/ExprConstant.cpp:9987-9990
+    } else {
+      llvm_unreachable(
+          "Expression is neither an init list nor a C++ paren list");
+    }
----------------



================
Comment at: clang/lib/CodeGen/CGExprAgg.cpp:91
+  void EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, QualType ArrayQTy,
+                     Expr *E, ArrayRef<Expr *> InitExprs);
 
----------------
Could you give `E` a better name?


================
Comment at: clang/lib/CodeGen/CGExprAgg.cpp:479
 void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType,
-                                   QualType ArrayQTy, InitListExpr *E) {
-  uint64_t NumInitElements = E->getNumInits();
+                                   QualType ArrayQTy, Expr *E,
+                                   ArrayRef<Expr *> InitExprs) {
----------------
Ditto


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129531/new/

https://reviews.llvm.org/D129531



More information about the cfe-commits mailing list