| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
// elaborated-type-specifier: |
| 4 |
// class-key '::'? nested-name-specifier? 'template'? simple-template-id |
| 5 |
// Tests that this form is accepted by the compiler but does not follow |
| 6 |
// the elaborated lookup rules of [basic.lookup.elab]. |
| 7 |
|
| 8 |
template <typename> class Ident {}; // expected-note {{previous use is here}} |
| 9 |
|
| 10 |
namespace A { |
| 11 |
template <typename> void Ident(); |
| 12 |
|
| 13 |
class Ident<int> AIdent; // expected-error {{refers to a function template}} |
| 14 |
class ::Ident<int> AnotherIdent; |
| 15 |
} |
| 16 |
|
| 17 |
class Ident<int> GlobalIdent; |
| 18 |
union Ident<int> GlobalIdent2; // expected-error {{ tag type that does not match }} |