1 | // RUN: %clang_cc1 -std=c++11 -verify %s |
2 | |
3 | // Note that this puts the expected lines before the directives to work around |
4 | // limitations in the -verify mode. |
5 | |
6 | void test(int *List, int Length, int Value) { |
7 | int i = 0; |
8 | |
9 | #pragma clang loop pipeline(disable) |
10 | for (int i = 0; i < Length; i++) { |
11 | List[i] = Value; |
12 | } |
13 | |
14 | #pragma clang loop pipeline_initiation_interval(10) |
15 | for (int i = 0; i < Length; i++) { |
16 | List[i] = Value; |
17 | } |
18 | |
19 | /* expected-error {{expected ')'}} */ #pragma clang loop pipeline(disable |
20 | /* expected-error {{invalid argument; expected 'disable'}} */ #pragma clang loop pipeline(enable) |
21 | /* expected-error {{invalid argument; expected 'disable'}} */ #pragma clang loop pipeline(error) |
22 | /* expected-error {{expected '('}} */ #pragma clang loop pipeline disable |
23 | /* expected-error {{missing argument; expected an integer value}} */ #pragma clang loop pipeline_initiation_interval() |
24 | /* expected-error {{use of undeclared identifier 'error'}} */ #pragma clang loop pipeline_initiation_interval(error) |
25 | /* expected-error {{expected '('}} */ #pragma clang loop pipeline_initiation_interval 1 2 |
26 | /* expected-error {{expected ')'}} */ #pragma clang loop pipeline_initiation_interval(1 |
27 | for (int i = 0; i < Length; i++) { |
28 | for (int j = 0; j < Length; j++) { |
29 | List[i * Length + j] = Value; |
30 | } |
31 | } |
32 | |
33 | } |
34 | |