================
@@ -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}}
----------------
katzdm wrote:
I've added some test cases for assigning to a non constexpr variable, both
within and outside of an immediate function context.
https://github.com/llvm/llvm-project/pull/89565
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits