Lines Matching +full:2 +full:- +full:clause
1 // RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
4 // expected-note@+1 {{defined as threadprivate or thread local}}
30 // expected-error@+2 {{expression must have integral or unscoped enumeration type, not 'double'}} in test_iteration_spaces()
39 // expected-error@+2 {{variable must be of integer or random access iterator type}} in test_iteration_spaces()
44 // expected-error@+2 {{variable must be of integer or random access iterator type}} in test_iteration_spaces()
49 …// expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = i… in test_iteration_spaces()
53 …// expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = i… in test_iteration_spaces()
58 …// expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = i… in test_iteration_spaces()
63 …// expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = i… in test_iteration_spaces()
68 // expected-warning@+3 {{expression result unused}} in test_iteration_spaces()
69 …// expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = i… in test_iteration_spaces()
74 …// expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = i… in test_iteration_spaces()
84 …// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>… in test_iteration_spaces()
89 …// expected-error@+3 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>… in test_iteration_spaces()
90 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
95 …// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>… in test_iteration_spaces()
100 …// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>… in test_iteration_spaces()
105 …// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>… in test_iteration_spaces()
112 for (int i = 11; i > 10; i--) in test_iteration_spaces()
125 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
130 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
136 // is really loop-invariant). in test_iteration_spaces()
141 // expected-error@+2 {{expression must have integral or unscoped enumeration type, not 'float'}} in test_iteration_spaces()
146 // Ok - step was converted to integer type. in test_iteration_spaces()
151 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
153 for (ii = 0; ii < 10; jj = ii + 2) in test_iteration_spaces()
156 // expected-warning@+3 {{relational comparison result unused}} in test_iteration_spaces()
157 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
159 for (ii = 0; ii < 10; jj > kk + 2) in test_iteration_spaces()
162 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
167 // expected-warning@+3 {{expression result unused}} in test_iteration_spaces()
168 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
173 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
178 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_iteration_spaces()
183 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in test_iteration_spaces()
184 …// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenM… in test_iteration_spaces()
189 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in test_iteration_spaces()
190 …// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenM… in test_iteration_spaces()
192 for (ii = 0; ii < 10; ii = ii + (int)(0.8 - 0.45)) in test_iteration_spaces()
195 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in test_iteration_spaces()
196 …// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenM… in test_iteration_spaces()
198 for (ii = 0; (ii) < 10; ii-=25) in test_iteration_spaces()
201 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in test_iteration_spaces()
202 …// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenM… in test_iteration_spaces()
204 for (ii = 0; (ii < 10); ii-=0) in test_iteration_spaces()
207 // expected-note@+3 {{loop step is expected to be negative due to this condition}} in test_iteration_spaces()
208 …// expected-error@+2 {{increment expression must cause 'ii' to decrease on each iteration of OpenM… in test_iteration_spaces()
213 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in test_iteration_spaces()
214 …// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenM… in test_iteration_spaces()
216 for (ii = 0; ii < 10; (ii) = (1-1)+(ii)) in test_iteration_spaces()
219 // expected-note@+3 {{loop step is expected to be negative due to this condition}} in test_iteration_spaces()
220 …// expected-error@+2 {{increment expression must cause 'ii' to decrease on each iteration of OpenM… in test_iteration_spaces()
222 for ((ii = 0); ii > 10; (ii-=0)) in test_iteration_spaces()
225 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in test_iteration_spaces()
226 …// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenM… in test_iteration_spaces()
228 for (ii = 0; (ii < 10); (ii-=0)) in test_iteration_spaces()
231 // expected-note@+2 {{defined as private}} in test_iteration_spaces()
232 …// expected-error@+2 {{loop iteration variable in the associated loop of 'omp simd' directive may … in test_iteration_spaces()
237 // expected-error@+3 {{unexpected OpenMP clause 'shared' in directive '#pragma omp simd'}} in test_iteration_spaces()
238 // expected-note@+2 {{defined as shared}} in test_iteration_spaces()
239 …// expected-error@+2 {{loop iteration variable in the associated loop of 'omp simd' directive may … in test_iteration_spaces()
248 #pragma omp simd lastprivate(ii) linear(jj) collapse(2) // expected-note {{defined as linear}} in test_iteration_spaces()
250 …for (jj = 0; jj < 10; jj++) // expected-error {{loop iteration variable in the associated loop of … in test_iteration_spaces()
256 // expected-error@+2 {{loop iteration variable in the associated loop of 'omp simd' directive may n… in test_iteration_spaces()
271 #pragma omp simd collapse(2) in test_iteration_spaces()
277 // expected-error@+2 {{statement after '#pragma omp simd' must be a for loop}} in test_iteration_spaces()
283 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in test_iteration_spaces()
284 …// expected-error@+2 {{increment expression must cause 'i' to increase on each iteration of OpenMP… in test_iteration_spaces()
286 for (unsigned i = 9; i < 10; i--) { in test_iteration_spaces()
295 …// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var =… in test_iteration_spaces()
303 // Iterators allowed in openmp for-loops.
312 distance(Iter first, Iter last) { return first - last; } in distance()
319 Iter0 operator --() { return *this; } in operator --()
323 // expected-note@+1 2 {{candidate function not viable: no known conversion from 'Iter1' to 'Iter0' …
324 int operator -(Iter0 a, Iter0 b) { return 0; } in operator -()
330 Iter1 operator --() { return *this; } in operator --()
344 GoodIter operator --() { return *this; } in operator --()
352 // expected-note@+1 2 {{candidate function not viable: no known conversion from 'Iter1' to 'GoodIte…
353 int operator -(GoodIter a, GoodIter b) { return 0; } in operator -()
354 // expected-note@+1 2 {{candidate function not viable: requires single argument 'a', but 2 argument…
355 GoodIter operator -(GoodIter a) { return a; } in operator -()
356 // expected-note@+1 2 {{candidate function not viable: no known conversion from 'Iter1' to 'GoodIte…
357 GoodIter operator -(GoodIter a, int v) { return GoodIter(); } in operator -()
359 // expected-note@+1 2 {{candidate function not viable: no known conversion from 'Iter1' to 'int' fo…
360 GoodIter operator -(int v, GoodIter a) { return GoodIter(); } in operator -()
369 …// expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = i… in test_with_random_access_iterator()
374 for (GoodIter I = begin; I >= end; --I) in test_with_random_access_iterator()
376 …// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var =… in test_with_random_access_iterator()
380 …// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var =… in test_with_random_access_iterator()
384 …// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var =… in test_with_random_access_iterator()
388 …// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var =… in test_with_random_access_iterator()
390 for (GoodIter I(1,2); I < end; ++I) in test_with_random_access_iterator()
396 for (begin = GoodIter(1,2); begin < end; ++begin) in test_with_random_access_iterator()
398 …// expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = i… in test_with_random_access_iterator()
405 …// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>… in test_with_random_access_iterator()
407 for (GoodIter I = begin; I - I; ++I) in test_with_random_access_iterator()
409 …// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>… in test_with_random_access_iterator()
413 …// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>… in test_with_random_access_iterator()
417 // expected-note@+3 {{loop step is expected to be negative due to this condition}} in test_with_random_access_iterator()
418 …// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP… in test_with_random_access_iterator()
423 for (GoodIter I = begin; I >= end; I = I - 1) in test_with_random_access_iterator()
425 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_with_random_access_iterator()
427 for (GoodIter I = begin; I >= end; I = -I) in test_with_random_access_iterator()
429 // expected-note@+3 {{loop step is expected to be negative due to this condition}} in test_with_random_access_iterator()
430 …// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP… in test_with_random_access_iterator()
432 for (GoodIter I = begin; I >= end; I = 2 + I) in test_with_random_access_iterator()
434 …// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtrac… in test_with_random_access_iterator()
436 for (GoodIter I = begin; I >= end; I = 2 - I) in test_with_random_access_iterator()
443 …// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var =… in test_with_random_access_iterator()
449 // expected-error@+3 {{invalid operands to binary expression ('Iter1' and 'Iter1')}} in test_with_random_access_iterator()
450 …// expected-error@+2 {{could not calculate number of iterations calling 'operator-' with upper and… in test_with_random_access_iterator()
454 // expected-note@+3 {{loop step is expected to be negative due to this condition}} in test_with_random_access_iterator()
455 …// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP… in test_with_random_access_iterator()
461 // expected-error@+4 {{invalid operands to binary expression ('Iter1' and 'float')}} in test_with_random_access_iterator()
462 …// expected-error@+3 {{could not calculate number of iterations calling 'operator-' with upper and… in test_with_random_access_iterator()
463 …// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var =… in test_with_random_access_iterator()
474 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in dotest_lt()
475 …// expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP… in dotest_lt()
480 // expected-note@+3 {{loop step is expected to be positive due to this condition}} in dotest_lt()
481 …// expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP… in dotest_lt()
497 // expected-note@+3 2 {{loop step is expected to be negative due to this condition}} in dotest_gt()
498 …// expected-error@+2 2 {{increment expression must cause 'I' to decrease on each iteration of Open… in dotest_gt()
503 // expected-note@+3 2 {{loop step is expected to be negative due to this condition}} in dotest_gt()
504 …// expected-error@+2 2 {{increment expression must cause 'I' to decrease on each iteration of Open… in dotest_gt()
510 // expected-note@+3 {{loop step is expected to be negative due to this condition}} in dotest_gt()
511 …// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP… in dotest_gt()
526 TC<GoodIter, -100> t2; in test_with_template()
528 …t2.dotest_lt(begin, end); // expected-note {{in instantiation of member function 'TC<GoodIter, -10… in test_with_template()
529 …dotest_gt(begin, end); // expected-note {{in instantiation of function template specialization 'do… in test_with_template()
530 …dotest_gt<unsigned, -10>(0, 100); // expected-note {{in instantiation of function template special… in test_with_template()
551 break; // expected-error {{'break' statement cannot be used in OpenMP for loop}} in test_loop_break()
554 break; // expected-error {{'break' statement cannot be used in OpenMP for loop}} in test_loop_break()
576 try { // expected-error {{'try' statement cannot be used in OpenMP simd region}} in test_loop_eh()
579 throw a[i]; // expected-error {{'throw' statement cannot be used in OpenMP simd region}} in test_loop_eh()
581 throw a[i]; // expected-error {{'throw' statement cannot be used in OpenMP simd region}} in test_loop_eh()
585 throw a[i]; // expected-error {{'throw' statement cannot be used in OpenMP simd region}} in test_loop_eh()
586 return; // expected-error {{cannot return from OpenMP region}} in test_loop_eh()
597 throw c[i]; // expected-error {{'throw' statement cannot be used in OpenMP simd region}} in test_loop_eh()