1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s 2 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s 3 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s 4 5 // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s 6 // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s 7 // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s 8 // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} 9 10 int nested(int a) { 11 #pragma omp parallel 12 ++a; 13 14 auto F = [&]() { 15 #if __cplusplus <= 199711L 16 // expected-warning@-2 {{'auto' type specifier is a C++11 extension}} 17 // expected-error@-3 {{expected expression}} 18 // expected-error@-4 {{expected ';' at end of declaration}} 19 #else 20 // expected-no-diagnostics 21 #endif 22 23 #pragma omp parallel 24 { 25 #pragma omp target 26 ++a; 27 } 28 }; 29 F(); 30 #if __cplusplus <= 199711L 31 // expected-error@-2 {{C++ requires a type specifier for all declarations}} 32 #endif 33 return a; 34 #if __cplusplus <= 199711L 35 // expected-error@-2 {{expected unqualified-id}} 36 #endif 37 } 38 #if __cplusplus <= 199711L 39 // expected-error@-2 {{extraneous closing brace ('}')}} 40 #endif 41