xref: /llvm-project/clang/test/CXX/over/over.built/ast-20.cpp (revision 737f540abd578df094f04f690a9b5b52028374b4)
1*737f540aSClement Courbet // RUN: %clang_cc1 -std=c++20 -ast-dump %s -ast-dump-filter Test | FileCheck %s
2*737f540aSClement Courbet 
3*737f540aSClement Courbet namespace std {
4*737f540aSClement Courbet   struct strong_ordering {
5*737f540aSClement Courbet     int n;
operator intstd::strong_ordering6*737f540aSClement Courbet     constexpr operator int() const { return n; }
7*737f540aSClement Courbet     static const strong_ordering less, equal, greater;
8*737f540aSClement Courbet   };
9*737f540aSClement Courbet   constexpr strong_ordering strong_ordering::less{-1},
10*737f540aSClement Courbet       strong_ordering::equal{0}, strong_ordering::greater{1};
11*737f540aSClement Courbet }
12*737f540aSClement Courbet 
13*737f540aSClement Courbet template <typename T, typename U>
Test(T * pt,U * pu)14*737f540aSClement Courbet auto Test(T* pt, U* pu) {
15*737f540aSClement Courbet   // CHECK: BinaryOperator {{.*}} '<dependent type>' '<=>'
16*737f540aSClement Courbet   // CHECK-NEXT: DeclRefExpr {{.*}} 'T *' lvalue ParmVar {{.*}} 'pt' 'T *'
17*737f540aSClement Courbet   // CHECK-NEXT: DeclRefExpr {{.*}} 'U *' lvalue ParmVar {{.*}} 'pu' 'U *'
18*737f540aSClement Courbet   (void)(pt <=> pu);
19*737f540aSClement Courbet 
20*737f540aSClement Courbet }
21*737f540aSClement Courbet 
22*737f540aSClement Courbet 
23