| 1 |
// RUN: %clang_cc1 -verify -std=c++20 %s |
| 2 |
|
| 3 |
namespace GH61885 { |
| 4 |
void similar() { // expected-note {{'similar' declared here}} |
| 5 |
if constexpr (similer<>) {} // expected-error {{use of undeclared identifier 'similer'; did you mean 'similar'?}} \ |
| 6 |
expected-warning {{address of function 'similar<>' will always evaluate to 'true'}} \ |
| 7 |
expected-note {{prefix with the address-of operator to silence this warning}} |
| 8 |
} |
| 9 |
void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of undeclared identifier '__adl_swap'}} |
| 10 |
|
| 11 |
int AA() { return true;} // expected-note {{'AA' declared here}} |
| 12 |
|
| 13 |
void b() { if constexpr (AAA<>) {}} // expected-error {{use of undeclared identifier 'AAA'; did you mean 'AA'?}} \ |
| 14 |
expected-warning {{address of function 'AA<>' will always evaluate to 'true'}} \ |
| 15 |
expected-note {{prefix with the address-of operator to silence this warning}} |
| 16 |
} |
| 17 |
|