1// RUN: %clang_cc1 -std=c++11 -verify %s 2// RUN: %clang_cc1 -std=c++1y -verify %s 3 4template<typename T> struct S { typedef int type; }; 5 6template<typename T> void f() { 7 auto x = [] { return 0; } (); 8 // FIXME: We should be able to produce a 'missing typename' diagnostic here. 9 S<decltype(x)>::type n; // expected-error 2{{}} 10} 11 12#if __cplusplus > 201103L 13template<typename T> void g() { 14 auto x = [] () -> auto { return 0; } (); 15 S<decltype(x)>::type n; // expected-error 2{{}} 16} 17#endif 18