// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s template using alias_ref = T; template void func_ref() {} template struct class_ref {}; template struct U { static int a; }; template struct S; // expected-note 2{{here}} template int U::a = S::kError; // expected-error 2{{undefined}} template void f() { // FIXME: The standard suggests that U<0>::a is odr-used by this expression, // but it's not entirely clear that's the right behaviour. (void)alias_ref::a>(); (void)func_ref::a>(); // expected-note {{here}} (void)class_ref::a>(); // expected-note {{here}} }; int main() { f(); // expected-note 2{{here}} } namespace N { template struct S { static int n; }; template int S::n = 5; void g(int*); template int f() { int k[S::n]; g(k); return k[3]; } int j = f(); }