p5.cpp revision e41721e7dfabcc15cb50be9075a4153f1ad648ea
1// RUN: %clang_cc1 -fexceptions -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