1 // RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
3 // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
8 #pragma omp teams // expected-error {{unexpected OpenMP directive '#pragma omp teams'}}
10 int main(int argc, char **argv) {
13 f; // expected-error {{use of undeclared identifier 'f'}}
15 #pragma omp teams { // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
18 #pragma omp teams ( // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
21 #pragma omp teams [ // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
24 #pragma omp teams ] // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
27 #pragma omp teams ) // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
30 #pragma omp teams } // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
35 // expected-warning@+2 {{extra tokens at the end of '#pragma omp teams' are ignored}}
37 #pragma omp teams unknown()
47 goto L1; // expected-error {{use of undeclared label 'L1'}}
51 for (int i = 0; i < 10; ++i) {
58 break; // expected-error {{'break' statement not in loop or switch statement}}
59 continue; // expected-error {{'continue' statement not in loop statement}}
66 #pragma omp teams default(none)
67 ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
69 goto L2; // expected-error {{use of undeclared label 'L2'}}
77 return 1; // expected-error {{cannot return from OpenMP region}}
80 [[]] // expected-error {{an attribute list cannot appear here}}
83 for (int n = 0; n < 100; ++n) {}