20 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s2 3template <typename T>4struct X {};5auto b = []() {6 struct S {7 static typename X<decltype(int)>::type Run(){}; // expected-error {{expected '('}}8 };9 return 5;10}();11 12template <typename T1, typename T2>13class PC {14};15 16template <typename T>17class P {18 static typename PC<T, Invalid>::Type Foo(); // expected-error {{undeclared identifier 'Invalid'}}19};20