p2-0x.cpp revision 762bb9d0ad20320b9f97a841dce57ba5e8e48b07
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s 2 3struct A { typedef int type; }; 4template<typename T> using X = A; // expected-note {{declared here}} 5struct X<int>* p2; // expected-error {{elaborated type refers to a type alias template}} 6 7 8template<typename T> using Id = T; // expected-note {{declared here}} 9template<template<typename> class F> 10struct Y { 11 struct F<int> i; // expected-error {{elaborated type refers to a type alias template}} 12 typename F<A>::type j; // ok 13 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 18}; 19template struct Y<Id>; // expected-note {{requested here}} 20