================ @@ -1392,7 +1392,8 @@ class CXXRecordDecl : public RecordDecl { bool allowConstDefaultInit() const { return !data().HasUninitializedFields || !(data().HasDefaultedDefaultConstructor || - needsImplicitDefaultConstructor()); + needsImplicitDefaultConstructor()) || + hasInClassInitializer(); ---------------- Rajveer100 wrote:
The two tests that were broken: ```c++ struct some_init { int a = 0; int b; int c = 0; }; void constobjs() { // ... const some_init si; // ... } ``` ```c++ struct Ints2 { int a = 10; int b; }; constexpr Ints2 ints22; ``` https://github.com/llvm/llvm-project/pull/96301 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits