1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
6 bool foobool(int argc) {
10 struct S1; // expected-note {{declared here}}
16 S2 &operator=(S2 &s2) { return *this; }
23 S3 &operator=(S3 &s3) { return *this; }
28 S4 &operator=(const S4 &s4); // expected-note {{implicitly declared private here}}
36 S5 &operator=(const S5 &s5) { return *this; } // expected-note {{implicitly declared private here}}
51 #pragma omp threadprivate(h, k, l, m)
55 #pragma omp threadprivate(x)
61 int main(int argc, char **argv) {
63 #pragma omp parallel for copyin // expected-error {{expected '(' after 'copyin'}}
64 for (i = 0; i < argc; ++i)
66 #pragma omp parallel for copyin( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
67 for (i = 0; i < argc; ++i)
69 #pragma omp parallel for copyin() // expected-error {{expected expression}}
70 for (i = 0; i < argc; ++i)
72 #pragma omp parallel for copyin(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
73 for (i = 0; i < argc; ++i)
75 #pragma omp parallel for copyin(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
76 for (i = 0; i < argc; ++i)
78 #pragma omp parallel for copyin(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
79 for (i = 0; i < argc; ++i)
81 #pragma omp parallel for copyin(l) // expected-error {{'operator=' is a private member of 'S4'}}
82 for (i = 0; i < argc; ++i)
84 #pragma omp parallel for copyin(S1) // expected-error {{'S1' does not refer to a value}}
85 for (i = 0; i < argc; ++i)
87 #pragma omp parallel for copyin(argv[1]) // expected-error {{expected variable name}}
88 for (i = 0; i < argc; ++i)
90 #pragma omp parallel for copyin(i) // expected-error {{copyin variable must be threadprivate}}
91 for (i = 0; i < argc; ++i)
93 #pragma omp parallel for copyin(m) // expected-error {{'operator=' is a private member of 'S5'}}
94 for (i = 0; i < argc; ++i)
96 #pragma omp parallel for copyin(ST<int>::s, B::x) // expected-error {{copyin variable must be threadprivate}}
97 for (i = 0; i < argc; ++i)