]>
git.proxmox.com Git - rustc.git/blob - src/llvm/tools/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p2-0x.cpp
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 struct A
{ typedef int type
; };
4 template<typename T
> using X
= A
; // expected-note {{declared here}}
5 struct X
<int>* p2
; // expected-error {{elaborated type refers to a type alias template}}
8 template<typename T
> using Id
= T
; // expected-note {{declared here}}
9 template<template<typename
> class F
>
11 struct F
<int> i
; // expected-error {{elaborated type refers to a type alias template}}
12 typename F
<A
>::type j
; // ok
14 // FIXME: don't produce the diagnostic both for the definition and the instantiation.
15 template<typename T
> using U
= F
<char>; // expected-note 2{{declared here}}
16 struct Y
<F
>::template U
<char> k
; // expected-error 2{{elaborated type refers to a type alias template}}
17 typename Y
<F
>::template U
<char> l
; // ok
19 template struct Y
<Id
>; // expected-note {{requested here}}