For templates, fields can have incomplete types:
template <class T>
struct A2 {
struct B;
B b;
};
Don't try to touch the DefinitionData of those fields.
llvm-svn: 261301
if (!Field->hasInClassInitializer() && !Field->isMutable()) {
if (CXXRecordDecl *FieldType = Field->getType()->getAsCXXRecordDecl()) {
- if (!FieldType->allowConstDefaultInit())
+ if (FieldType->hasDefinition() && !FieldType->allowConstDefaultInit())
data().HasUninitializedFields = true;
} else {
data().HasUninitializedFields = true;