================ @@ -5451,10 +5451,23 @@ bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, NumInitializers * sizeof(CXXCtorInitializer*)); Constructor->setCtorInitializers(baseOrMemberInitializers); + SourceLocation Location = Constructor->getLocation(); + + for (CXXCtorInitializer *Initializer : Info.AllToInit) { + FieldDecl *Field = Initializer->getAnyMember(); + if (!Field) + continue; + + RecordDecl *FieldRecordDecl = Field->getParent(); + if (!FieldRecordDecl->isUnion() || ---------------- momo5502 wrote:
One test failed, but it seems that it now behaves identical to gcc ( https://godbolt.org/z/fbxT8xnY9 ), so I fixed the test. https://github.com/llvm/llvm-project/pull/128866 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits