blob: b3df295a8fa29b161dd16c9090010e6022485e7e [file] [log] [blame]
Alexey Bataevdb390212015-05-20 04:24:19 +00001// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
Alexey Bataev9c2e8ee2014-07-11 11:25:16 +00002
3void foo();
4
5int 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}