shafik added inline comments.
================
Comment at: clang/include/clang/AST/ExprCXX.h:4760
+ : Expr(CXXParenListInitExprClass, T,
+ T->isLValueReferenceType() ? VK_LValue
+ : T->isRValueReferenceType() ? VK_XValue
----------------
It looks like we use this idiom in several places, it may be worth it to sink
this as a member function of `QualType`
================
Comment at: clang/lib/CodeGen/CGExprAgg.cpp:1609
+ dyn_cast<CXXRecordDecl>(E->getType()->castAs<RecordType>()->getDecl());
+ for (FieldDecl *FD : RD->fields()) {
+ if (FD->isUnnamedBitfield())
----------------
This is second time I see you looking for the initialized field for a union
while `InitListExpr` has `getInitializedFieldInUnion()`. Would it be too
painful to also do that for `CXXParenListInitExpr ` to avoid the code
duplication?
================
Comment at: clang/lib/Sema/SemaInit.cpp:5411
+ ResultType = S.Context.getConstantArrayType(
+ AT->getElementType(), llvm::APInt(32, ArrayLength), nullptr,
+ ArrayType::Normal, 0);
----------------
nit
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129531/new/
https://reviews.llvm.org/D129531
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits