| 1 |
// RUN: %clang_cc1 %s -verify -fopenacc |
| 2 |
|
| 3 |
template<typename T> |
| 4 |
void Func() { |
| 5 |
#pragma acc parallel |
| 6 |
typename T::type I; //#ILOC |
| 7 |
#pragma acc serial |
| 8 |
typename T::type IS; //#ILOCSERIAL |
| 9 |
#pragma acc kernels |
| 10 |
typename T::type IK; //#ILOCKERNELS |
| 11 |
} |
| 12 |
|
| 13 |
struct S { |
| 14 |
using type = int; |
| 15 |
}; |
| 16 |
|
| 17 |
void use() { |
| 18 |
Func<S>(); |
| 19 |
// expected-error@#ILOC{{type 'int' cannot be used prior to '::' because it has no members}} |
| 20 |
// expected-note@+3{{in instantiation of function template specialization 'Func<int>' requested here}} |
| 21 |
// expected-error@#ILOCSERIAL{{type 'int' cannot be used prior to '::' because it has no members}} |
| 22 |
// expected-error@#ILOCKERNELS{{type 'int' cannot be used prior to '::' because it has no members}} |
| 23 |
Func<int>(); |
| 24 |
} |