Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / AST / ast-print-sycl-unique-stable-name.cpp
blobb55d01aa1b6b6a89407d1c5711cb4792222e0754
1 // RUN: %clang_cc1 -ast-print -fsycl-is-device %s -o - | FileCheck %s
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()));
10 struct Type {
11 using type = int;
13 double foo();
16 void use() {
17 WrappedInTemplate(Type{});
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()));
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()));