diff options
Diffstat (limited to 'test/SemaTemplate/anonymous-union.cpp')
-rw-r--r-- | test/SemaTemplate/anonymous-union.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaTemplate/anonymous-union.cpp b/test/SemaTemplate/anonymous-union.cpp index 59d1f25..97ecd6e 100644 --- a/test/SemaTemplate/anonymous-union.cpp +++ b/test/SemaTemplate/anonymous-union.cpp @@ -17,3 +17,24 @@ struct T1 : public T0, public T { struct A : public T0 { }; void f1(T1<A> *S) { S->f0(); } // expected-note{{instantiation of member function}} + +namespace rdar8635664 { + template<typename T> + struct X { + struct inner; + + struct inner { + union { + int x; + float y; + }; + + typedef T type; + }; + }; + + void test() { + X<int>::inner i; + i.x = 0; + } +} |