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 #define p _Pragma("omp parallel") 11 12 int nested(int a) { 13 #pragma omp parallel p // expected-error {{unexpected OpenMP directive}} 14 ++a; 15 #pragma omp parallel 16 ++a; 17 18 auto F = [&]() { 19 #if __cplusplus <= 199711L 20 // expected-warning@-2 {{'auto' type specifier is a C++11 extension}} 21 // expected-error@-3 {{expected expression}} 22 #endif 23 24 #pragma omp parallel 25 { 26 #pragma omp target 27 ++a; 28 } 29 }; 30 F(); 31 return a; 32 } 33