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

Alan Zhao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 13:01:57 PST 2022


ayzhao marked 3 inline comments as done.
ayzhao added inline comments.


================
Comment at: clang/include/clang/AST/ExprCXX.h:4760
+      : Expr(CXXParenListInitExprClass, T,
+             T->isLValueReferenceType()   ? VK_LValue
+             : T->isRValueReferenceType() ? VK_XValue
----------------
shafik wrote:
> It looks like we use this idiom in several places, it may be worth it to sink this as a member function of `QualType`
note: this patch was already merged, so I created a new patch addressing the revisions at D140159

It turns out there's a method `getValueKindForType(...)` that does the exact same thing, so I used that instead.


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