// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=expected,cxx2a %s -fcxx-exceptions -triple=x86_64-linux-gnu -Wno-c++2b-extensions
// RUN: %clang_cc1 -std=c++2b -fsyntax-only -verify=expected,cxx2b %s -fcxx-exceptions -triple=x86_64-linux-gnu -Wpre-c++2b-compat
;
constexpr int
constexpr int
constexpr int
constexpr int
constexpr int
constexpr int
constexpr int
constexpr int j0 = ;
constexpr int
constexpr int k0 = ;
constexpr int
constexpr int je = ; // expected-error {{constexpr variable 'je' must be initialized by a constant expression}} \
// expected-note {{in call}}
constexpr int
constexpr int ke = ; // expected-error {{constexpr variable 'ke' must be initialized by a constant expression}} \
// expected-note {{in call}}
constexpr int
constexpr int
constexpr int
constexpr int non_literal_1 = ;
// namespace eval_goto
// Test that explicitly constexpr lambdas behave correctly,
// This is to be contrasted with the test for implicitly constexpr lambdas below.
int
// Test whether lambdas are correctly treated as implicitly constexpr under the
// relaxed C++23 rules (and similarly as not implicitly constexpr under the
// C++20 rules).
int
constexpr auto
constexpr auto non_literal_valid_in_cxx2b = dependent_var_def_lambda<NonLiteral>; // \
// cxx2a-error {{constexpr variable 'non_literal_valid_in_cxx2b' must be initialized by a constant expression}} \
// cxx2a-note {{non-constexpr function}}