1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 #pragma clang loop pipeline(disable) /* expected-error {{expected unqualified-id}} */
5 for (int i
= 0; i
< 10; ++i
)
9 void test(int *List
, int Length
, int Value
) {
12 /* expected-error {{invalid argument of type 'double'; expected an integer type}} */ #pragma clang loop pipeline_initiation_interval(1.0)
13 /* expected-error {{invalid value '0'; must be positive}} */ #pragma clang loop pipeline_initiation_interval(0)
14 /* expected-error {{invalid value '-1'; must be positive}} */ #pragma clang loop pipeline_initiation_interval(-1)
15 for (int i
= 0; i
< Length
; i
++) {
16 for (int j
= 0; j
< Length
; j
++) {
17 List
[i
* Length
+ j
] = Value
;
21 #pragma clang loop pipeline(disable)
22 /* expected-error {{expected a for, while, or do-while loop to follow '#pragma clang loop'}} */ int j
= Length
;
23 #pragma clang loop pipeline_initiation_interval(4)
24 /* expected-error {{expected a for, while, or do-while loop to follow '#pragma clang loop'}} */ int k
= Length
;
26 #pragma clang loop pipeline(disable)
27 #pragma clang loop pipeline_initiation_interval(4) /* expected-error {{incompatible directives 'pipeline(disable)' and 'pipeline_initiation_interval(4)'}} */
28 for (int i
= 0; i
< Length
; i
++) {
32 #pragma clang loop pipeline(disable)
33 /* expected-error {{expected statement}} */ }