================ @@ -1032,17 +1043,15 @@ int f() { namespace GH57682 { void test() { - constexpr auto l1 = []() consteval { // expected-error {{cannot take address of consteval call operator of '(lambda at}} \ - // expected-note 2{{declared here}} + constexpr auto l1 = []() consteval { // expected-note {{declared here}} return 3; }; constexpr int (*f1)(void) = l1; // expected-error {{constexpr variable 'f1' must be initialized by a constant expression}} \ // expected-note {{pointer to a consteval declaration is not a constant expression}} - constexpr auto lstatic = []() static consteval { // expected-error {{cannot take address of consteval call operator of '(lambda at}} \ - // expected-note 2{{declared here}} \ - // expected-warning {{extension}} + constexpr auto lstatic = []() static consteval { // expected-note {{declared here}} \ + // expected-warning {{extension}} ---------------- cor3ntin wrote:
Do we have existing tests for assigning the address of a lambda to a non constexpr variable? https://github.com/llvm/llvm-project/pull/89565 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits