brintos

brintos / llvm-project-archived public Read only

0
0
Text · 841 B · 07687b6 Raw
26 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++112// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y3void f() {4  auto int a; // expected-warning {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}}5  int auto b; // expected-error{{cannot combine with previous 'int' declaration specifier}}6}7 8typedef auto PR25449(); // expected-error {{'auto' not allowed in typedef}}9 10thread_local auto x; // expected-error {{requires an initializer}}11 12void g() {13  [](auto){}(0);14#if __cplusplus == 201103L15  // expected-error@-2 {{'auto' not allowed in lambda parameter before C++14}}16#endif17}18 19void rdar47689465() {20  int x = 0;21  [](auto __attribute__((noderef)) *){}(&x);22#if __cplusplus == 201103L23  // expected-error@-2 {{'auto' not allowed in lambda parameter before C++14}}24#endif25}26