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
) {
9 #pragma clang loop vectorize(assume_safety)
10 #pragma clang loop interleave(assume_safety)
11 while (i
+ 1 < Length
) {
15 /* expected-error {{expected ')'}} */ #pragma clang loop vectorize(assume_safety
16 /* expected-error {{expected ')'}} */ #pragma clang loop interleave(assume_safety
18 /* expected-error {{invalid argument; expected 'enable', 'full' or 'disable'}} */ #pragma clang loop unroll(assume_safety)
19 /* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop distribute(assume_safety)
21 /* expected-error {{invalid argument; expected 'enable', 'assume_safety' or 'disable'}} */ #pragma clang loop vectorize(badidentifier)
22 /* expected-error {{invalid argument; expected 'enable', 'assume_safety' or 'disable'}} */ #pragma clang loop interleave(badidentifier)
23 /* expected-error {{invalid argument; expected 'enable', 'full' or 'disable'}} */ #pragma clang loop unroll(badidentifier)
24 while (i
-7 < Length
) {
28 #pragma clang loop vectorize(enable)
29 /* expected-error {{duplicate directives 'vectorize(enable)' and 'vectorize(assume_safety)'}} */ #pragma clang loop vectorize(assume_safety)
30 #pragma clang loop interleave(enable)
31 /* expected-error {{duplicate directives 'interleave(enable)' and 'interleave(assume_safety)'}} */ #pragma clang loop interleave(assume_safety)
32 while (i
-9 < Length
) {