1 // RUN: %clang_cc1 -verify -std=c++2a -fclang-abi-compat=latest -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
2 // expected-no-diagnostics
4 template <typename T
, int N
> concept SmallerThan
= sizeof(T
) < N
;
5 template <typename T
> concept Small
= SmallerThan
<T
, 1000>;
7 template <typename T
> struct X
{ using type
= T
; };
9 template <typename T
> void f(int n
) requires requires
{
14 // compound-requirement
17 {T() * 2} noexcept
-> SmallerThan
<1234>;
22 typename X
<decltype(n
)>;
24 requires SmallerThan
<T
, 256>;
26 // CHECK: define {{.*}}@_Z1fIiEviQrqXcvT__EXfp_Xeqfp_cvS0__EXplcvS0__ELi1ER5SmallXmicvS0__ELi1ENXmlcvS0__ELi2ENR11SmallerThanILi1234EETS0_T1XIS0_ETNS3_4typeETS2_IiEQ11SmallerThanIS0_Li256EEE(
27 template void f
<int>(int);
29 template <typename T
> void g(int n
) requires
requires (T m
) {
30 // reference to our parameter vs an enclosing parameter
33 // CHECK: define {{.*}}@_Z1gIiEviQrQT__XplfL0p_fp_E(
34 template void g
<int>(int);