1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
3 // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
8 bool foobool(int argc
) {
12 struct S1
; // expected-note 2 {{declared here}}
18 S2
&operator=(S2
&s2
) { return *this; }
25 S3
&operator=(S3
&s3
) { return *this; }
30 S4
&operator=(const S4
&s4
); // expected-note 3 {{implicitly declared private here}}
38 S5
&operator=(const S5
&s5
) { return *this; } // expected-note 3 {{implicitly declared private here}}
53 #pragma omp threadprivate(h, k, l, m)
57 #pragma omp threadprivate(x)
63 template <class T
, typename S
, int N
>
64 T
tmain(T argc
, S
**argv
) {
68 #pragma omp distribute parallel for copyin // expected-error {{expected '(' after 'copyin'}}
69 for (i
= 0; i
< argc
; ++i
)
73 #pragma omp distribute parallel for copyin( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
74 for (i
= 0; i
< argc
; ++i
)
78 #pragma omp distribute parallel for copyin() // expected-error {{expected expression}}
79 for (i
= 0; i
< argc
; ++i
)
83 #pragma omp distribute parallel for copyin(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
84 for (i
= 0; i
< argc
; ++i
)
88 #pragma omp distribute parallel for copyin(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
89 for (i
= 0; i
< argc
; ++i
)
93 #pragma omp distribute parallel for copyin(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
94 for (i
= 0; i
< argc
; ++i
)
98 #pragma omp distribute parallel for copyin(l) // expected-error 2 {{'operator=' is a private member of 'S4'}}
99 for (i
= 0; i
< argc
; ++i
)
103 #pragma omp distribute parallel for copyin(S1) // expected-error {{'S1' does not refer to a value}}
104 for (i
= 0; i
< argc
; ++i
)
108 #pragma omp distribute parallel for copyin(argv[1]) // expected-error {{expected variable name}}
109 for (i
= 0; i
< argc
; ++i
)
113 #pragma omp distribute parallel for copyin(i) // expected-error {{copyin variable must be threadprivate}}
114 for (i
= 0; i
< argc
; ++i
)
118 #pragma omp distribute parallel for copyin(m) // expected-error 2 {{'operator=' is a private member of 'S5'}}
119 for (i
= 0; i
< argc
; ++i
)
123 #pragma omp distribute parallel for copyin(ST<int>::s, B::x) // expected-error {{copyin variable must be threadprivate}}
124 for (i
= 0; i
< argc
; ++i
)
128 int main(int argc
, char **argv
) {
132 #pragma omp distribute parallel for copyin // expected-error {{expected '(' after 'copyin'}}
133 for (i
= 0; i
< argc
; ++i
)
137 #pragma omp distribute parallel for copyin( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
138 for (i
= 0; i
< argc
; ++i
)
142 #pragma omp distribute parallel for copyin() // expected-error {{expected expression}}
143 for (i
= 0; i
< argc
; ++i
)
147 #pragma omp distribute parallel for copyin(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
148 for (i
= 0; i
< argc
; ++i
)
152 #pragma omp distribute parallel for copyin(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
153 for (i
= 0; i
< argc
; ++i
)
157 #pragma omp distribute parallel for copyin(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
158 for (i
= 0; i
< argc
; ++i
)
162 #pragma omp distribute parallel for copyin(l) // expected-error {{'operator=' is a private member of 'S4'}}
163 for (i
= 0; i
< argc
; ++i
)
167 #pragma omp distribute parallel for copyin(S1) // expected-error {{'S1' does not refer to a value}}
168 for (i
= 0; i
< argc
; ++i
)
172 #pragma omp distribute parallel for copyin(argv[1]) // expected-error {{expected variable name}}
173 for (i
= 0; i
< argc
; ++i
)
177 #pragma omp distribute parallel for copyin(i) // expected-error {{copyin variable must be threadprivate}}
178 for (i
= 0; i
< argc
; ++i
)
182 #pragma omp distribute parallel for copyin(m) // expected-error {{'operator=' is a private member of 'S5'}}
183 for (i
= 0; i
< argc
; ++i
)
187 #pragma omp distribute parallel for copyin(ST<int>::s, B::x) // expected-error {{copyin variable must be threadprivate}}
188 for (i
= 0; i
< argc
; ++i
)
191 return tmain
<int, char, 3>(argc
, argv
); // expected-note {{in instantiation of function template specialization 'tmain<int, char, 3>' requested here}}