diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-31 03:10:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-31 03:10:55 +0000 |
commit | 8c3f89032c8822c443fb8a1633d297b60e5ca90c (patch) | |
tree | df2f7334dec128b83c11bd537b3e756c9c4023c8 /test/SemaCXX/illegal-member-initialization.cpp | |
parent | 0814809e5bc27cccd59b63e99ab1eb52042dc13c (diff) |
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
Diffstat (limited to 'test/SemaCXX/illegal-member-initialization.cpp')
-rw-r--r-- | test/SemaCXX/illegal-member-initialization.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/illegal-member-initialization.cpp b/test/SemaCXX/illegal-member-initialization.cpp index ceefa5d1b7..1890dbc9b5 100644 --- a/test/SemaCXX/illegal-member-initialization.cpp +++ b/test/SemaCXX/illegal-member-initialization.cpp @@ -20,3 +20,13 @@ struct X { 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. +}; |