1 // RUN: %clang_cc1 -std=c++20 -fclang-abi-compat=latest -emit-llvm %s -o - -triple=x86_64-linux-gnu | FileCheck %s
2 // RUN: %clang_cc1 -std=c++20 -fclang-abi-compat=latest -emit-llvm %s -o - -triple=x86_64-linux-gnu | llvm-cxxfilt -n | FileCheck %s --check-prefix DEMANGLED
71 template<auto tparam
> void dummy(){}
75 // Zero init'ed cases.
76 dummy
<wrapper1
<int>{}>();
77 // CHECK: call void @_Z5dummyITnDaXtl8wrapper1IiEEEEvv
78 // DEMANGLED: call void @void dummy<wrapper1<int>{}>()()
79 dummy
<wrapper2
<float>{}>();
80 // CHECK: call void @_Z5dummyITnDaXtl8wrapper2IfEEEEvv
81 // DEMANGLED: call void @void dummy<wrapper2<float>{}>()()
82 dummy
<wrapper3
<short>{}>();
83 // CHECK: call void @_Z5dummyITnDaXtl8wrapper3IsEEEEvv
84 // DEMANGLED: call void @void dummy<wrapper3<short>{}>()()
85 dummy
<wrapper4
<double>{}>();
86 // CHECK: call void @_Z5dummyITnDaXtl8wrapper4IdEEEEvv
87 // DEMANGLED: call void @void dummy<wrapper4<double>{}>()()
88 dummy
<wrapper5
<long long>{}>();
89 // CHECK: call void @_Z5dummyITnDaXtl8wrapper5IxEEEEvv
90 // DEMANGLED: call void @void dummy<wrapper5<long long>{}>()()
91 dummy
<wrapper6
<int>{}>();
92 // CHECK: call void @_Z5dummyITnDaXtl8wrapper6IiEEEEvv
93 // DEMANGLED: call void @void dummy<wrapper6<int>{}>()()
95 dummy
<wrapper1
<double>{123.0}>();
96 // CHECK: call void @_Z5dummyITnDaXtl8wrapper1IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_ELd405ec00000000000EEEEEEvv
97 // DEMANGLED: call void @void dummy<wrapper1<double>{wrapper1<double>::'unnamed'{.RightName = wrapper1<double>::'unnamed'::'unnamed'{0x1.ec{{.*}}p+6}}}>()()
98 dummy
<wrapper2
<double>{123.0}>();
99 // CHECK: call void @_Z5dummyITnDaXtl8wrapper2IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_ELd405ec00000000000EEEEEEvv
100 // DEMANGLED: call void @void dummy<wrapper2<double>{wrapper2<double>::'unnamed'{.RightName = wrapper2<double>::'unnamed'::'unnamed'{0x1.ec{{.*}}p+6}}}>()()
101 dummy
<wrapper3
<double>{123, 456}>();
102 // CHECK: call void @_Z5dummyITnDaXtl8wrapper3IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_Etl4BaseLi123EELd407c800000000000EEEEEEvv
103 // DEMANGLED: call void @void dummy<wrapper3<double>{wrapper3<double>::'unnamed'{.RightName = wrapper3<double>::'unnamed'::'unnamed'{Base{123}, 0x1.c8{{.*}}p+8}}}>()()
104 dummy
<wrapper4
<double>{123}>();
105 // CHECK: call void @_Z5dummyITnDaXtl8wrapper4IdEtlNS1_Ut_Edi9RightNameLi123EEEEEvv
106 // DEMANGLED: call void @void dummy<wrapper4<double>{wrapper4<double>::'unnamed'{.RightName = 123}}>()()
107 dummy
<wrapper5
<double>{123.0, 456.0}>();
108 // CHECK: call void @_Z5dummyITnDaXtl8wrapper5IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_EtlNS3_Ut_ELd405ec00000000000EELd407c800000000000EEEEEEvv
109 // DEMANGLED: call void @void dummy<wrapper5<double>{wrapper5<double>::'unnamed'{.RightName = wrapper5<double>::'unnamed'::'unnamed'{wrapper5<double>::'unnamed'::'unnamed'::'unnamed'{0x1.ec{{.*}}p+6}, 0x1.c8{{.*}}p+8}}}>()()
110 dummy
<wrapper6
<double>{1}>();
111 // CHECK: call void @_Z5dummyITnDaXtl8wrapper6IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_Edi9RightNameLd3ff0000000000000EEEEEEvv
112 // DEMANGELD: call void @void dummy<wrapper6<double>{wrapper6<double>::'unnamed'{.RightName = wrapper6<double>::'unnamed'::'unnamed'{.RightName = 0x1{{.*}}p+0}}}>()()