brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · e500d4d Raw
34 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -verify %s2 3// Note that this puts the expected lines before the directives to work around4// limitations in the -verify mode.5 6void 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(disable20/* 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 disable23/* 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 226/* expected-error {{expected ')'}} */ #pragma clang loop pipeline_initiation_interval(127  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