[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / pragma-pipeline.cpp
blobe500d4d2d5fb25007d882f9d7029994391187869
1 // RUN: %clang_cc1 -std=c++11 -verify %s
3 // Note that this puts the expected lines before the directives to work around
4 // limitations in the -verify mode.
6 void test(int *List, int Length, int Value) {
7 int i = 0;
9 #pragma clang loop pipeline(disable)
10 for (int i = 0; i < Length; i++) {
11 List[i] = Value;
14 #pragma clang loop pipeline_initiation_interval(10)
15 for (int i = 0; i < Length; i++) {
16 List[i] = Value;
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;