Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / invalid-if-constexpr.cpp
blob7643c47488f05740073f9bc588a271e7dc0bff70
1 // RUN: %clang_cc1 -verify -std=c++20 %s
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'?}}
7 void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \
8 // expected-note {{'__sync_swap' declared here}}
10 int AA() { return true;} // expected-note {{'AA' declared here}}
12 void b() { if constexpr (AAA<>) {}} // expected-error {{use of undeclared identifier 'AAA'; did you mean 'AA'?}}