1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
6 bool foobool(int argc) {
10 struct S1; // expected-note 2 {{declared here}}
16 S2 &operator=(S2 &s2) { return *this; }
23 S3 &operator=(S3 &s3) { return *this; }
28 S4 &operator=(const S4 &s4); // expected-note 3 {{implicitly declared private here}}
36 S5 &operator=(const S5 &s5) { return *this; } // expected-note 3 {{implicitly declared private here}}
51 #pragma omp threadprivate(h, k, l, m)
55 #pragma omp threadprivate(x)
61 template <class T, typename S, int N>
62 T tmain(T argc, S **argv) {
66 #pragma omp distribute parallel for simd copyin // expected-error {{expected '(' after 'copyin'}}
67 for (i = 0; i < argc; ++i)
71 #pragma omp distribute parallel for simd copyin( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
72 for (i = 0; i < argc; ++i)
76 #pragma omp distribute parallel for simd copyin() // expected-error {{expected expression}}
77 for (i = 0; i < argc; ++i)
81 #pragma omp distribute parallel for simd copyin(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
82 for (i = 0; i < argc; ++i)
86 #pragma omp distribute parallel for simd copyin(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
87 for (i = 0; i < argc; ++i)
91 #pragma omp distribute parallel for simd copyin(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
92 for (i = 0; i < argc; ++i)
96 #pragma omp distribute parallel for simd copyin(l) // expected-error 2 {{'operator=' is a private member of 'S4'}}
97 for (i = 0; i < argc; ++i)
101 #pragma omp distribute parallel for simd copyin(S1) // expected-error {{'S1' does not refer to a value}}
102 for (i = 0; i < argc; ++i)
106 #pragma omp distribute parallel for simd copyin(argv[1]) // expected-error {{expected variable name}}
107 for (i = 0; i < argc; ++i)
111 #pragma omp distribute parallel for simd copyin(i) // expected-error {{copyin variable must be threadprivate}}
112 for (i = 0; i < argc; ++i)
116 #pragma omp distribute parallel for simd copyin(m) // expected-error 2 {{'operator=' is a private member of 'S5'}}
117 for (i = 0; i < argc; ++i)
121 #pragma omp distribute parallel for simd copyin(ST<int>::s, B::x) // expected-error {{copyin variable must be threadprivate}}
122 for (i = 0; i < argc; ++i)
126 int main(int argc, char **argv) {
130 #pragma omp distribute parallel for simd copyin // expected-error {{expected '(' after 'copyin'}}
131 for (i = 0; i < argc; ++i)
135 #pragma omp distribute parallel for simd copyin( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
136 for (i = 0; i < argc; ++i)
140 #pragma omp distribute parallel for simd copyin() // expected-error {{expected expression}}
141 for (i = 0; i < argc; ++i)
145 #pragma omp distribute parallel for simd copyin(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
146 for (i = 0; i < argc; ++i)
150 #pragma omp distribute parallel for simd copyin(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
151 for (i = 0; i < argc; ++i)
155 #pragma omp distribute parallel for simd copyin(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
156 for (i = 0; i < argc; ++i)
160 #pragma omp distribute parallel for simd copyin(l) // expected-error {{'operator=' is a private member of 'S4'}}
161 for (i = 0; i < argc; ++i)
165 #pragma omp distribute parallel for simd copyin(S1) // expected-error {{'S1' does not refer to a value}}
166 for (i = 0; i < argc; ++i)
170 #pragma omp distribute parallel for simd copyin(argv[1]) // expected-error {{expected variable name}}
171 for (i = 0; i < argc; ++i)
175 #pragma omp distribute parallel for simd copyin(i) // expected-error {{copyin variable must be threadprivate}}
176 for (i = 0; i < argc; ++i)
180 #pragma omp distribute parallel for simd copyin(m) // expected-error {{'operator=' is a private member of 'S5'}}
181 for (i = 0; i < argc; ++i)
185 #pragma omp distribute parallel for simd copyin(ST<int>::s, B::x) // expected-error {{copyin variable must be threadprivate}}
186 for (i = 0; i < argc; ++i)
189 return tmain<int, char, 3>(argc, argv); // expected-note {{in instantiation of function template specialization 'tmain<int, char, 3>' requested here}}