| 1 |
// RUN: %clang_cc1 %s -verify -fopenacc |
| 2 |
|
| 3 |
namespace NS { |
| 4 |
void foo(); // expected-note{{declared here}} |
| 5 |
|
| 6 |
template<typename T> |
| 7 |
void templ(); // expected-note 2{{declared here}} |
| 8 |
|
| 9 |
class C { // #CDef |
| 10 |
void private_mem_func(); // #PrivateMemFunc |
| 11 |
public: |
| 12 |
void public_mem_func(); |
| 13 |
}; |
| 14 |
} |
| 15 |
|
| 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) |
| 21 |
|
| 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) |
| 27 |
|
| 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>) |
| 33 |
|
| 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>) |
| 40 |
|
| 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()) |
| 45 |
|
| 46 |
// expected-error@+2 {{expected unqualified-id}} |
| 47 |
// expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}} |
| 48 |
#pragma acc routine() |
| 49 |
|
| 50 |
// expected-error@+2 {{expected unqualified-id}} |
| 51 |
// expected-warning@+1{{OpenACC construct 'routine' not yet implemented, pragma ignored}} |
| 52 |
#pragma acc routine(int) |
| 53 |
|
| 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) |