// RUN: %clang_cc1 -std=c++11 -verify %s // RUN: %clang_cc1 -std=c++1y -verify %s template struct S { typedef int type; }; template void f() { auto x = [] { return 0; } (); // FIXME: We should be able to produce a 'missing typename' diagnostic here. S::type n; // expected-error 2{{}} } #if __cplusplus > 201103L template void g() { auto x = [] () -> auto { return 0; } (); S::type n; // expected-error 2{{}} } #endif