1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
3 // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
8 bool foobool(int argc
) {
12 struct S1
; // expected-note {{declared here}}
14 template <class T
, class S
> // expected-note {{declared here}}
15 int tmain(T argc
, S
**argv
) {
17 #pragma omp masked taskloop simd priority // expected-error {{expected '(' after 'priority'}}
18 for (int i
= 0; i
< 10; ++i
)
20 #pragma omp masked taskloop simd priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
21 for (int i
= 0; i
< 10; ++i
)
23 #pragma omp masked taskloop simd priority () // expected-error {{expected expression}}
24 for (int i
= 0; i
< 10; ++i
)
26 #pragma omp masked taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
27 for (int i
= 0; i
< 10; ++i
)
29 #pragma omp masked taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp masked taskloop simd' are ignored}}
30 for (int i
= 0; i
< 10; ++i
)
32 #pragma omp masked taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc])
33 for (int i
= 0; i
< 10; ++i
)
35 #pragma omp masked taskloop simd priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp masked taskloop simd' cannot contain more than one 'priority' clause}}
36 for (int i
= 0; i
< 10; ++i
)
38 #pragma omp masked taskloop simd priority (S) // expected-error {{'S' does not refer to a value}}
39 for (int i
= 0; i
< 10; ++i
)
41 #pragma omp masked taskloop simd priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
42 for (int i
= 0; i
< 10; ++i
)
44 #pragma omp masked taskloop simd priority(0)
45 for (int i
= 0; i
< 10; ++i
)
47 #pragma omp masked taskloop simd priority(-1) // expected-error {{argument to 'priority' clause must be a non-negative integer value}}
48 for (int i
= 0; i
< 10; ++i
)
54 int main(int argc
, char **argv
) {
57 #pragma omp masked taskloop simd priority filter(tid) // expected-error {{expected '(' after 'priority'}}
58 for (int i
= 0; i
< 10; ++i
)
60 #pragma omp masked taskloop simd priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
61 for (int i
= 0; i
< 10; ++i
)
63 #pragma omp masked taskloop simd priority () // expected-error {{expected expression}}
64 for (int i
= 0; i
< 10; ++i
)
66 #pragma omp masked taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
67 for (int i
= 0; i
< 10; ++i
)
69 #pragma omp masked taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp masked taskloop simd' are ignored}}
70 for (int i
= 0; i
< 10; ++i
)
72 #pragma omp masked taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc])
73 for (int i
= 0; i
< 10; ++i
)
75 #pragma omp masked taskloop simd priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp masked taskloop simd' cannot contain more than one 'priority' clause}}
76 for (int i
= 0; i
< 10; ++i
)
78 #pragma omp masked taskloop simd priority (S1) // expected-error {{'S1' does not refer to a value}}
79 for (int i
= 0; i
< 10; ++i
)
81 #pragma omp masked taskloop simd priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
82 for (int i
= 0; i
< 10; ++i
)
84 #pragma omp masked taskloop simd priority (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
85 for (int i
= 0; i
< 10; ++i
)
87 #pragma omp masked taskloop simd priority(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
88 for (int i
= 0; i
< 10; ++i
)
90 #pragma omp masked taskloop simd priority(0)
91 for (int i
= 0; i
< 10; ++i
)
93 #pragma omp masked taskloop simd priority(-1) // expected-error {{argument to 'priority' clause must be a non-negative integer value}}
94 for (int i
= 0; i
< 10; ++i
)
97 return tmain(argc
, argv
);