1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s 2 3 void foo(); 4 main(int argc,char ** argv)5int main(int argc, char **argv) { 6 #pragma omp parallel sections default // expected-error {{expected '(' after 'default'}} 7 { 8 #pragma omp parallel sections default( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}} 9 { 10 #pragma omp parallel sections default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} 11 { 12 #pragma omp parallel sections default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} 13 { 14 #pragma omp parallel sections default(shared), default(shared) // expected-error {{directive '#pragma omp parallel sections' cannot contain more than one 'default' clause}} 15 { 16 #pragma omp parallel sections default(x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} 17 { 18 foo(); 19 } 20 } 21 } 22 } 23 } 24 } 25 26 #pragma omp parallel sections default(none) 27 { 28 ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} 29 } 30 31 #pragma omp parallel sections default(none) 32 { 33 #pragma omp parallel sections default(shared) 34 { 35 ++argc; 36 } 37 } 38 return 0; 39 } 40