[flang][cuda] Update CompilerGeneratedNames pass to work on gpu module (#120660)
[llvm-project.git] / clang / test / CXX / over / over.oper / over.oper.general / p1.cpp
blobd49fb0645751a46e883655c8864538576b5f89d0
1 // RUN: %clang_cc1 -std=c++20 -verify -Wno-unused %s
3 template<typename T, typename U>
4 void operator->*(T, U);
6 template<typename T, typename U>
7 void operator+(T, U);
9 template<typename T, typename U>
10 void operator-(T, U);
12 template<typename T, typename U>
13 void operator*(T, U);
15 template<typename T, typename U>
16 void operator/(T, U);
18 template<typename T, typename U>
19 void operator%(T, U);
21 template<typename T, typename U>
22 void operator^(T, U);
24 template<typename T, typename U>
25 void operator&(T, U);
27 template<typename T, typename U>
28 void operator|(T, U);
30 template<typename T, typename U>
31 void operator+=(T, U);
33 template<typename T, typename U>
34 void operator-=(T, U);
36 template<typename T, typename U>
37 void operator*=(T, U);
39 template<typename T, typename U>
40 void operator/=(T, U);
42 template<typename T, typename U>
43 void operator%=(T, U);
45 template<typename T, typename U>
46 void operator^=(T, U);
48 template<typename T, typename U>
49 void operator&=(T, U);
51 template<typename T, typename U>
52 void operator|=(T, U);
54 template<typename T, typename U>
55 void operator==(T, U);
57 template<typename T, typename U>
58 void operator!=(T, U);
60 template<typename T, typename U>
61 void operator<(T, U);
63 template<typename T, typename U>
64 void operator>(T, U);
66 template<typename T, typename U>
67 void operator<=(T, U);
69 template<typename T, typename U>
70 void operator>=(T, U);
72 template<typename T, typename U>
73 void operator<=>(T, U);
75 template<typename T, typename U>
76 void operator&&(T, U);
78 template<typename T, typename U>
79 void operator||(T, U);
81 template<typename T, typename U>
82 void operator<<(T, U);
84 template<typename T, typename U>
85 void operator>>(T, U);
87 template<typename T, typename U>
88 void operator<<=(T, U);
90 template<typename T, typename U>
91 void operator>>=(T, U);
93 template<typename T, typename U>
94 void operator,(T, U);
96 template<typename T>
97 void operator*(T);
99 template<typename T>
100 void operator&(T);
102 template<typename T>
103 void operator+(T);
105 template<typename T>
106 void operator-(T);
108 template<typename T>
109 void operator!(T);
111 template<typename T>
112 void operator~(T);
114 template<typename T>
115 void operator++(T);
117 template<typename T>
118 void operator--(T);
120 template<typename T>
121 void operator++(T, int);
123 template<typename T>
124 void operator--(T, int);
126 template<typename T>
127 void f(int *x) {
128 [&](auto *y) {
132 -y; // expected-error {{invalid argument type 'auto *' to unary expression}}
134 ~y; // expected-error {{invalid argument type 'auto *' to unary expression}}
135 ++y;
136 --y;
137 y++;
138 y--;
139 y->*x;
140 y + x;
141 y - x;
142 y * x;
143 y / x;
144 y % x;
145 y ^ x;
146 y & x;
147 y | x;
148 y += x;
149 y -= x;
150 y *= x;
151 y /= x;
152 y %= x;
153 y ^= x;
154 y &= x;
155 y |= x;
156 y == x;
157 y != x;
158 y < x;
159 y > x;
160 y <= x;
161 y >= x;
162 y <=> x;
163 y && x;
164 y || x;
165 y << x;
166 y >> x;
167 y <<= x;
168 y >>= x;
169 y, x;
173 template void f<int>(int*);