1 // RUN: %clang_cc1 %s -verify -fopenacc
4 void foo(); // expected-note{{declared here}}
7 void templ(); // expected-note 2{{declared here}}
10 void private_mem_func(); // #PrivateMemFunc
12 void public_mem_func();
16 // expected-error@+2{{use of undeclared identifier 'foo'; did you mean 'NS::foo'?}}
17 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
18 #pragma acc routine(foo)
19 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
20 #pragma acc routine(NS::foo)
22 // expected-error@+2{{use of undeclared identifier 'templ'; did you mean 'NS::templ'?}}
23 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
24 #pragma acc routine(templ)
25 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
26 #pragma acc routine(NS::templ)
28 // expected-error@+2{{use of undeclared identifier 'templ'; did you mean 'NS::templ'?}}
29 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
30 #pragma acc routine(templ<int>)
31 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
32 #pragma acc routine(NS::templ<int>)
34 // expected-error@+2{{use of undeclared identifier 'T'}}
35 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
36 #pragma acc routine(templ<T>)
37 // expected-error@+2{{use of undeclared identifier 'T'}}
38 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
39 #pragma acc routine(NS::templ<T>)
41 // expected-error@+3{{expected ')'}}
42 // expected-note@+2{{to match this '('}}
43 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
44 #pragma acc routine (NS::foo())
46 // expected-error@+2 {{expected unqualified-id}}
47 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
50 // expected-error@+2 {{expected unqualified-id}}
51 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
52 #pragma acc routine(int)
54 // expected-error@+3{{'C' does not refer to a value}}
55 // expected-note@#CDef{{declared here}}
56 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
57 #pragma acc routine (NS::C)
58 // expected-error@+3{{'private_mem_func' is a private member of 'NS::C'}}
59 // expected-note@#PrivateMemFunc{{implicitly declared private here}}
60 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
61 #pragma acc routine (NS::C::private_mem_func)
62 // expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}}
63 #pragma acc routine (NS::C::public_mem_func)