diff options
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 8a61041463bae..1b5dc13cea015 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}}  | 
