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