improve diagnostics for case when a field type is unknown by
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
diff --git a/test/SemaCXX/illegal-member-initialization.cpp b/test/SemaCXX/illegal-member-initialization.cpp
index ceefa5d..1890dbc 100644
--- a/test/SemaCXX/illegal-member-initialization.cpp
+++ b/test/SemaCXX/illegal-member-initialization.cpp
@@ -20,3 +20,13 @@
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.
+};