blob: b55d01aa1b6b6a89407d1c5711cb4792222e0754 [file] [log] [blame]
Alexey Baderd754b972021-08-13 09:04:09 +03001// RUN: %clang_cc1 -ast-print -fsycl-is-device %s -o - | FileCheck %s
Erich Keaneeba69b52021-04-23 08:22:35 -07002
3template <typename T>
4void 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
10struct Type {
11 using type = int;
12
13 double foo();
14};
15
16void 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()));