Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / pr64462.cpp
blob7cffb3583dcd408bce551af42d889502a166de4c
1 // RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
3 auto c1(auto f, auto ...fs) {
4 constexpr bool a = true;
5 return [](auto) requires a {
6 constexpr bool b = true;
7 return []() requires a && b {
8 constexpr bool c = true;
9 return [](auto) requires a && b && c {
10 constexpr bool d = true;
11 // expected-note@+2{{because substituted constraint expression is ill-formed: no matching function for call to 'c1'}}
12 // expected-note@+1{{candidate function not viable: constraints not satisfied}}
13 return []() requires a && b && c && d && (c1(fs...)) {};
15 }();
16 }(1);
19 void foo() {
20 c1(true)(1.0)(); // expected-error{{no matching function for call to object of type}}