1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++23 %s
6 if (using U
= decltype([]{ return 42;}); true) {
7 static_assert(U
{}() == 42);
9 for (using U
= decltype([]{ return 42;}); [[maybe_unused
]] auto x
: "abc") {
10 static_assert(U
{}() == 42);
12 for (using U
= decltype([]{ return 42;}); false; ) {
13 static_assert(U
{}() == 42);
19 if (using U
= decltype([]{}.foo
); true) {} // expected-error {{no member named 'foo'}}
21 for (using U
= decltype([]{}.foo
); // expected-error {{no member named 'foo'}}
22 [[maybe_unused
]] auto x
: "abc") { }
24 for (using U
= decltype([]{}.foo
); // expected-error {{no member named 'foo'}}
30 err
<int>(); // expected-note {{in instantiation of function template specialization 'GH63627::err<int>'}}