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