add opensuse toolchain support, patch by Ismail Donmez!
[clang/stm8.git] / test / SemaTemplate / anonymous-union.cpp
blob97ecd6e60cca1510d0b00c74c3d8503ed7845cfc
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // PR5868
4 struct T0 {
5 int x;
6 union {
7 void *m0;
8 };
9 };
10 template <typename T>
11 struct T1 : public T0, public T {
12 void f0() {
13 m0 = 0; // expected-error{{ambiguous conversion}}
17 struct A : public T0 { };
19 void f1(T1<A> *S) { S->f0(); } // expected-note{{instantiation of member function}}
21 namespace rdar8635664 {
22 template<typename T>
23 struct X {
24 struct inner;
26 struct inner {
27 union {
28 int x;
29 float y;
32 typedef T type;
36 void test() {
37 X<int>::inner i;
38 i.x = 0;