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