brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1002 B · 9f27741 Raw
18 lines · cpp
1// RUN: %clang_cc1 -verify -std=c++20 %s2 3namespace GH61885 {4void 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}9void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of undeclared identifier '__adl_swap'}}10 11int AA() { return true;} // expected-note {{'AA' declared here}}12 13void 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 18