diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /test/SemaCXX/anonymous-struct.cpp | |
parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) |
Notes
Diffstat (limited to 'test/SemaCXX/anonymous-struct.cpp')
-rw-r--r-- | test/SemaCXX/anonymous-struct.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/anonymous-struct.cpp b/test/SemaCXX/anonymous-struct.cpp index 8a61041463ba..1b5dc13cea01 100644 --- a/test/SemaCXX/anonymous-struct.cpp +++ b/test/SemaCXX/anonymous-struct.cpp @@ -14,3 +14,10 @@ struct E { static struct { }; }; + +template <class T> void foo(T); +typedef struct { // expected-note {{use a tag name here to establish linkage prior to definition}} expected-note {{declared here}} + void test() { + foo(this); // expected-warning {{template argument uses unnamed type}} + } +} A; // expected-error {{unsupported: typedef changes linkage of anonymous type, but linkage was already computed}} |