// UNSUPPORTED: system-darwin // RUN: %clang %target_itanium_abi_host_triple %s -c -o - -gdwarf-4 -Xclang -gsimple-template-names=mangled -Xclang -debug-forward-template-params -std=c++20 \ // RUN: | llvm-dwarfdump --verify - // RUN: %clang %target_itanium_abi_host_triple %s -c -o - -gdwarf-4 -Xclang -gsimple-template-names=mangled -Xclang -debug-forward-template-params -std=c++20 -gmlt -fdebug-info-for-profiling \ // RUN: | llvm-dwarfdump --verify - // RUN: %clang %target_itanium_abi_host_triple %s -c -o - -gdwarf-4 -Xclang -gsimple-template-names=mangled -Xclang -debug-forward-template-params -std=c++20 -fdebug-types-section \ // RUN: | llvm-dwarfdump --verify - // RUN: %clang %target_itanium_abi_host_triple %s -c -o - -gdwarf-5 -Xclang -gsimple-template-names=mangled -Xclang -debug-forward-template-params -std=c++20 -fdebug-types-section \ // RUN: | llvm-dwarfdump --verify - #include #include template struct t1 { }; template struct t2; struct udt { }; namespace ns { struct udt { }; namespace inner { template struct ttp { }; struct udt { }; } template class T> void ttp_user() { } enum Enumeration : int { Enumerator1, Enumerator2, Enumerator3 = 1 }; enum class EnumerationClass { Enumerator1, Enumerator2, Enumerator3 = 1 }; enum : int { AnonEnum1, AnonEnum2, AnonEnum3 = 1 }; enum EnumerationSmall : unsigned char { kNeg = 0xff }; } template void f1() { t1 v1; t2 *v2; } template void f2() { } template void f3() { } template void f4() { } template struct t3 { }; extern template class t3; template class t3; struct outer_class { struct inner_class { }; }; int i = 3; template struct t4 { }; namespace { struct t5 { }; enum LocalEnum { LocalEnum1 }; } template void f5() { } template void f6() { } struct t6 { template void operator<<(int) { } template void operator<(int) { } template void operator<=(int) { } template operator t1*() { return nullptr; } template void operator-(int) { } template void operator*(int) { } template void operator/(int) { } template void operator%(int) { } template void operator^(int) { } template void operator&(int) { } template void operator|(int) { } template void operator~() { } template void operator!() { } template void operator=(int) { } template void operator>(int) { } template void operator,(int) { } template void operator()() { } template void operator[](int) { } template void operator<=>(int) { } template void* operator new(std::size_t, T) { __builtin_unreachable(); } template void operator delete(void*, T) { } template void* operator new[](std::size_t, T) { __builtin_unreachable(); } template void operator delete[](void*, T) { } template int operator co_await() { __builtin_unreachable(); } }; void operator"" _suff(unsigned long long) {} template class T> void f7() { } template class T, typename T2> void f8() { } template struct t7; using t7i = t7; template struct __attribute__((__preferred_name__(t7i))) t7 { }; struct t8 { void mem(); }; namespace ns { inline namespace inl { template struct t9 { }; } } template void (*f9())() { return nullptr; } struct t10 { template t10() { } }; template void operator_not_really() { } template struct t11 { }; struct t12 { t11 v1; }; template void f10() { } int main() { struct { } A; auto L = []{}; f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1>(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f2(); f3(); f3(); f3(); f3(); f3(); f3(); f3(); t4<3> v2; f3(); f3(); f3(); f3(); f3(); f3(); f3(); f3(); f3(); f3<__int128, ((__int128)9223372036854775807) * 2>(); f4(); f1>(); f1>>(); f1(); t3 v1; f1>>(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f5>(); f5<>(); f6>(); f1<>(); f1(); f1*>(); f1(); t6 v6; v6.operator<< (1); v6.operator< (1); v6.operator<= (1); v6.operator t1*(); v6.operator- (3); v6.operator* (3); v6.operator/ (3); v6.operator% (3); v6.operator^ (3); v6.operator& (3); v6.operator| (3); v6.operator~ (); v6.operator! (); v6.operator= (3); v6.operator> (3); v6.operator, (3); v6.operator() (); v6.operator[] (3); v6.operator<=> (3); t6::operator new(0, 0); t6::operator new[](0, 0); t6::operator delete(nullptr, 0); t6::operator delete[](nullptr, 0); v6.operator co_await(); 42_suff; struct t7 { }; f1(); f1(); f1(); f7(); f8(); using namespace ns; ttp_user(); f1(); t7i x; f1(); f7(); f1<_Atomic(int)>(); f1(); f1<__attribute__((__vector_size__(sizeof(int) * 2))) int>(); f1(); f1(); f1>(); t10 v3; f1(); f1(); f1(); f9(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1(); f1[1]>(); f1(); f1(); struct t8 { decltype(A) m; }; f1(); f1(); operator_not_really(); t12 v4; f1<_BitInt(3)>(); f1(); f1, t1<>)>(); f1::*>(); void fcc() __attribute__((swiftcall)); f1(); int fnrt() __attribute__((noreturn)); f1(); f10(); } void t8::mem() { struct t7 { }; f1(); f1(); } namespace complex_type_units { void external_function(); namespace { struct internal_type; } template struct t2; template > class t3 {}; template > struct t4 { }; struct t5 { t4<> v1; }; void f1() { t5 v1; t3<> v2; } }