================ @@ -1462,6 +1462,14 @@ void CXXRecordDecl::addedMember(Decl *D) { if (Using->getDeclName().getCXXOverloadedOperator() == OO_Equal) data().HasInheritedAssignment = true; } + + // HLSL: All user-defined data types are aggregates and use aggregate + // initialization. This _needs_ to change in the future. There are two + // relevant HLSL feature proposals that will depend on this changing: + // * 0005-strict-initializer-lists.md + // * https://github.com/microsoft/hlsl-specs/pull/325 + if (getLangOpts().HLSL) + data().Aggregate = data().UserDeclaredSpecialMembers == 0; ---------------- bogner wrote:
Does this comment match what this is doing? If I'm reading this correctly we're using the fact that there are no user declared constructors/destructors/assignment operators to decide that this is an aggregate - I guess that's because users aren't allowed to write those in HLSL so we can use it as a proxy? https://github.com/llvm/llvm-project/pull/123141 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits