1 // RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
6 #pragma omp teams // expected-error {{unexpected OpenMP directive '#pragma omp teams'}}
8 int main(int argc, char **argv) {
10 #pragma omp teams { // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
13 #pragma omp teams ( // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
16 #pragma omp teams [ // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
19 #pragma omp teams ] // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
22 #pragma omp teams ) // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
25 #pragma omp teams } // expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
30 // expected-warning@+2 {{extra tokens at the end of '#pragma omp teams' are ignored}}
32 #pragma omp teams unknown()
42 goto L1; // expected-error {{use of undeclared label 'L1'}}
46 for (int i = 0; i < 10; ++i) {
53 break; // expected-error {{'break' statement not in loop or switch statement}}
54 continue; // expected-error {{'continue' statement not in loop statement}}
61 #pragma omp teams default(none)
62 ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
64 goto L2; // expected-error {{use of undeclared label 'L2'}}
72 return 1; // expected-error {{cannot return from OpenMP region}}
75 [[]] // expected-error {{an attribute list cannot appear here}}
78 for (int n = 0; n < 100; ++n) {}