not emitting a follow-on error about 'int', which the user
never wrote. PR5924.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92339
91177308-0d34-0410-b5e6-
96231b3b80d8
}
else
NewExp = (Expr*)Args[0];
- if (PerformCopyInitialization(NewExp, FieldType, AA_Passing))
+ if (!Member->isInvalidDecl() &&
+ PerformCopyInitialization(NewExp, FieldType, AA_Passing))
return true;
Args[0] = NewExp;
}
B& b; // expected-note{{declared at}}
const B cb; // expected-note{{declared at}}
};
+
+
+// PR5924
+struct bar {};
+bar xxx();
+
+struct foo {
+ foo_t a; // expected-error {{unknown type name 'foo_t'}}
+ foo() : a(xxx()) {} // no error here.
+};