// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s struct A { typedef int type; }; template using X = A; // expected-note {{declared here}} struct X* p2; // expected-error {{type alias template 'X' cannot be referenced with a struct specifier}} template using Id = T; // expected-note {{declared here}} template class F> struct Y { struct F i; // expected-error {{type alias template 'Id' cannot be referenced with a struct specifier}} typename F::type j; // ok // FIXME: don't produce the diagnostic both for the definition and the instantiation. template using U = F; // expected-note 2{{declared here}} struct Y::template U k; // expected-error 2{{type alias template 'U' cannot be referenced with a struct specifier}} typename Y::template U l; // ok }; template struct Y; // expected-note {{requested here}}