Alexey Bader | d754b97 | 2021-08-13 09:04:09 +0300 | [diff] [blame] | 1 | // RUN: %clang_cc1 -ast-print -fsycl-is-device %s -o - | FileCheck %s |
Erich Keane | eba69b5 | 2021-04-23 08:22:35 -0700 | [diff] [blame] | 2 | |
| 3 | template <typename T> |
| 4 | void WrappedInTemplate(T t) { |
| 5 | (void)__builtin_sycl_unique_stable_name(T); |
| 6 | (void)__builtin_sycl_unique_stable_name(typename T::type); |
| 7 | (void)__builtin_sycl_unique_stable_name(decltype(t.foo())); |
| 8 | } |
| 9 | |
| 10 | struct Type { |
| 11 | using type = int; |
| 12 | |
| 13 | double foo(); |
| 14 | }; |
| 15 | |
| 16 | void use() { |
| 17 | WrappedInTemplate(Type{}); |
| 18 | } |
| 19 | |
| 20 | // CHECK: template <typename T> void WrappedInTemplate(T t) |
| 21 | // CHECK: __builtin_sycl_unique_stable_name(T); |
| 22 | // CHECK: __builtin_sycl_unique_stable_name(typename T::type); |
| 23 | // CHECK: __builtin_sycl_unique_stable_name(decltype(t.foo())); |
| 24 | |
| 25 | // CHECK: template<> void WrappedInTemplate<Type>(Type t) |
| 26 | // CHECK: __builtin_sycl_unique_stable_name(Type); |
| 27 | // CHECK: __builtin_sycl_unique_stable_name(typename Type::type); |
| 28 | // CHECK: __builtin_sycl_unique_stable_name(decltype(t.foo())); |