blob: f0f42f754cb548bde10828848949241577da6a84 [file] [log] [blame]
Douglas Gregor0499ab62011-02-25 15:54:31 +00001// RUN: %clang-cc1 -fsyntax-only -verify %s
2
3// Note: the formatting in this test case is intentionally funny, with
4// nested-name-specifiers stretched out vertically so that we can
5// match up diagnostics per-line and still verify that we're getting
6// good source-location information.
7
8namespace outer {
9 namespace inner {
10 template<typename T>
11 struct X0 {
12 };
13 }
14}
15
16template<typename T>
17struct add_reference {
18 typedef T& type;
19};
20
21namespace outer_alias = outer;
22
23template<typename T>
24struct UnresolvedUsingValueDeclTester {
25 using outer::inner::X0<
26 typename add_reference<T>::type
27 * // expected-error{{declared as a pointer to a reference of type}}
28 >::value;
29};
30
31UnresolvedUsingValueDeclTester<int> UnresolvedUsingValueDeclCheck; // expected-note{{in instantiation of template class}}
32
33template<typename T>
34struct UnresolvedUsingTypenameDeclTester {
35 using outer::inner::X0<
36 typename add_reference<T>::type
37 * // expected-error{{declared as a pointer to a reference of type}}
38 >::value;
39};
40
41UnresolvedUsingTypenameDeclTester<int> UnresolvedUsingTypenameDeclCheck; // expected-note{{in instantiation of template class}}
42