[clang] [Clang] Implement P3074R7: trivial unions (C++26) (PR #185886)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 01:00:00 PDT 2026
================
@@ -1180,7 +1180,11 @@ void CXXRecordDecl::addedMember(Decl *D) {
// C++11 [class]p5:
// A default constructor is trivial if [...] no non-static data member
// of its class has a brace-or-equal-initializer.
- data().HasTrivialSpecialMembers &= ~SMF_DefaultConstructor;
+ // P3074R7 [class.default.ctor]p3:
----------------
cor3ntin wrote:
```suggestion
// C++26 [class.default.ctor]p3:
```
And everywhere else there is a similar comment
https://github.com/llvm/llvm-project/pull/185886
More information about the cfe-commits
mailing list