cjdb added inline comments.
================ Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:3292 + std::string NewFieldName = + PackedField->getName().str() + "@" + std::to_string(Arg); + PackedField->setDeclName(&Context.Idents.get(NewFieldName)); ---------------- Does LLVM have some form of `absl::StrCat` that we can use instead of `operator+`? ================ Comment at: clang/lib/Sema/TreeTransform.h:4191-4218 + // Transform unexpanded field name and create a new member expression. + DeclarationName ExpandedName = &SemaRef.Context.Idents.get( + UnExpanedNameStr + "@" + std::to_string(Arg)); + // Construct name info with new name and keep other members the same. + DeclarationNameInfo ExpandedNameInfo = DeclarationNameInfo( + ExpandedName, MemberExpr->getMemberNameInfo().getLoc(), + MemberExpr->getMemberNameInfo().getInfo()); ---------------- It may be worth putting this into its own named function to help with readability. ================ Comment at: clang/test/CodeGenCXX/data_member_packs.cpp:73 + // CHECK: i32 @_Z3sumIJiiEEDaDpT_(i32 noundef %ts, i32 noundef %ts1) + sum_pack2<int, int>(s6); + // Check instantiation of sum(int, long, float, double) ---------------- This needs to be passed to one of the sum functions and checked that it's generating the correct code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158006/new/ https://reviews.llvm.org/D158006 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits