1 // RUN: %clang_cc1 %s -verify -fopenacc
4 static char* NSArray
;// expected-note{{declared here}}
5 static int NSInt
;// expected-note 2{{declared here}}
8 template<typename T
, int I
>
10 char *ArrayPtr
= getArrayPtr();
11 for (int i
= 0; i
< 10; ++i
) {
12 // expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}}
13 #pragma acc cache(ArrayPtr[T::value + I:I + 5], T::array[(i + T::value, 5): 6])
15 for (int i
= 0; i
< 10; ++i
) {
16 // expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}}
17 #pragma acc cache(NS::NSArray[NS::NSInt])
20 for (int i
= 0; i
< 10; ++i
) {
21 // expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}}
22 #pragma acc cache(NS::NSArray[NS::NSInt : NS::NSInt])
25 for (int i
= 0; i
< 10; ++i
) {
26 // expected-error@+2{{use of undeclared identifier 'NSArray'; did you mean 'NS::NSArray'}}
27 // expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}}
28 #pragma acc cache(NSArray[NS::NSInt : NS::NSInt])
31 for (int i
= 0; i
< 10; ++i
) {
32 // expected-error@+2{{use of undeclared identifier 'NSInt'; did you mean 'NS::NSInt'}}
33 // expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}}
34 #pragma acc cache(NS::NSArray[NSInt : NS::NSInt])
37 for (int i
= 0; i
< 10; ++i
) {
38 // expected-error@+2{{use of undeclared identifier 'NSInt'; did you mean 'NS::NSInt'}}
39 // expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}}
40 #pragma acc cache(NS::NSArray[NS::NSInt : NSInt])
45 static constexpr int value
= 5;
46 static constexpr char array
[] ={1,2,3,4,5};