// RUN: %clang_cc1 %s -O0 -disable-llvm-passes -triple=x86_64 -std=c++20 -emit-llvm -o - | FileCheck %s namespace GH161029_regression1 { template auto f(int) { _Fp{}(0); } template void g() { (..., f<_Fp>(_Js)); } enum E { k }; template struct ElementAt; template struct ElementAt<0, First> { static int value; }; template struct TagSet { template using Tag = ElementAt; }; template struct S { void U() { (void)TagSet::template Tag<0>::value; } }; S> s; void h() { g void { s.U(); }), 0>(); } // CHECK: call void @_ZN20GH161029_regression11SINS_6TagSetINS_1EELS2_0EEEE1UEv }