1 // RUN: %clang_cc1 -std=c++2b %s -verify 2 __anon07a197370102null3auto LL0 = [] {}; __anon07a197370202() 4auto LL1 = []() {}; __anon07a197370302() 5auto LL2 = []() mutable {}; __anon07a197370402() 6auto LL3 = []() constexpr {}; 7 8 auto L0 = [] constexpr {}; __anon07a197370502null9auto L1 = [] mutable {}; 10 auto L2 = [] noexcept {}; 11 auto L3 = [] constexpr mutable {}; 12 auto L4 = [] mutable constexpr {}; 13 auto L5 = [] constexpr mutable noexcept {}; __anon07a197370602null14auto L6 = [s = 1] mutable {}; 15 auto L7 = [s = 1] constexpr mutable noexcept {}; 16 auto L8 = [] -> bool { return true; }; 17 auto L9 = []<typename T> { return true; }; 18 auto L10 = []<typename T> noexcept { return true; }; 19 auto L11 = []<typename T> -> bool { return true; }; 20 auto L12 = [] consteval {}; __anon07a197370702() 21auto L13 = []() requires true {}; 22 auto L14 = []<auto> requires true() requires true {}; 23 auto L15 = []<auto> requires true noexcept {}; __anon07a197370802null24auto L16 = [] [[maybe_unused]]{}; 25 26 auto XL0 = [] mutable constexpr mutable {}; // expected-error{{cannot appear multiple times}} 27 auto XL1 = [] constexpr mutable constexpr {}; // expected-error{{cannot appear multiple times}} 28 auto XL2 = []) constexpr mutable constexpr {}; // expected-error{{expected body of lambda expression}} 29 auto XL3 = []( constexpr mutable constexpr {}; // expected-error{{invalid storage class specifier}} \ 30 // expected-error{{function parameter cannot be constexpr}} \ 31 // expected-error{{a type specifier is required}} \ 32 // expected-error{{expected ')'}} \ 33 // expected-note{{to match this '('}} \ 34 // expected-error{{expected body}} \ 35 // expected-warning{{duplicate 'constexpr'}} 36 37 // http://llvm.org/PR49736 38 auto XL4 = [] requires true {}; // expected-error{{expected body}} 39 auto XL5 = []<auto> requires true requires true {}; // expected-error{{expected body}} 40 auto XL6 = []<auto> requires true noexcept requires true {}; // expected-error{{expected body}} 41