1 // RUN: clang-cc -fsyntax-only -verify %s
12 int type; // expected-note 2{{referenced member 'type' is declared here}}
18 typename N::A::type *ip1 = &i;
19 typename N::B::type *ip2 = &i; // expected-error{{no type named 'type' in 'struct N::B'}}
20 typename N::C::type *ip3 = &i; // expected-error{{typename specifier refers to non-type member 'type'}}
23 typename N::A::type f(typename N::A::type(a)); // expected-warning{{parentheses were disambiguated as a function declarator}}
27 for (typename A::type i = 0; i < 10; ++i)
30 const typename N::A::type f2(d);
36 typedef typename T::type type; // expected-error {{no type named 'type' in 'struct N::B'}} \
37 // expected-error {{no type named 'type' in 'struct B'}} \
38 // FIXME: location info for error above isn't very good \
39 // expected-error 2{{typename specifier refers to non-type member 'type'}} \
40 // expected-error{{type 'int' cannot be used prior to '::' because it has no members}}
44 N::X<N::A>::type *ip4 = &i;
45 N::X<N::B>::type *ip5 = &i; // expected-note{{in instantiation of template class 'struct N::X<struct N::B>' requested here}} \
46 // expected-error{{no type named 'type' in}}
47 N::X<N::C>::type *ip6 = &i; // expected-note{{in instantiation of template class 'struct N::X<struct N::C>' requested here}} \
48 // expected-error{{no type named 'type' in}}
50 N::X<int>::type fail1; // expected-note{{in instantiation of template class 'struct N::X<int>' requested here}} \
51 // expected-error{{no type named 'type' in}}
55 typedef typename N::X<T>::type *type; // expected-note{{in instantiation of template class 'struct N::X<struct B>' requested here}} \
56 // expected-note{{in instantiation of template class 'struct N::X<struct C>' requested here}}
68 int type; // expected-note{{referenced member 'type' is declared here}}
71 ::Y<A>::type ip7 = &i;
72 ::Y<B>::type ip8 = &i; // expected-note{{in instantiation of template class 'struct Y<struct B>' requested here}} \
73 // expected-error{{no type named 'type' in}}
74 ::Y<C>::type ip9 = &i; // expected-note{{in instantiation of template class 'struct Y<struct C>' requested here}} \
75 // expected-error{{no type named 'type' in}}