p5.cpp revision 6a75cd9c1d54625fca7b5477ab9545bcdbd85ea4
1// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x 2void f() { 3 auto a = a; // expected-error{{variable 'a' declared with 'auto' type cannot appear in its own initializer}} 4} 5 6struct S { auto a; }; // expected-error{{'auto' not allowed in struct member}} 7 8void f(auto a) // expected-error{{'auto' not allowed in function prototype}} 9{ 10 try { } catch (auto a) { } // expected-error{{'auto' not allowed in exception declaration}} 11} 12 13template <auto a = 10> class C { }; // expected-error{{'auto' not allowed in template parameter}} 14