// RUN: %clang_cc1 -std=c++20 -verify %s
// expected-no-diagnostics
// bullet 2: decltype(x) where x is a non-type template parameter gives the
// type of X, after deduction, if any.
namespaceClassNTTP{template<decltype(auto) v,typename ParamT,typename ExprT>voidf(){using U =decltype(v);using U = ParamT;using V =decltype((v));using V = ExprT;}// The names of most non-reference NTTPs are prvalues.
templatevoidf<0,int,int>();// The name of a class NTTP of type T is an lvalue of type 'const T'.
structX{};templatevoid f<X{}, X,const X&>();// Ensure we get this right for references to classes too.
template<auto x>auto&TempParamObject = x;templatevoidf<TempParamObject<X{}>,const X&,const X&>();structY{} y;templatevoid f<(y), Y&, Y&>();templatevoidf<y, Y,const Y&>();}