shafik added inline comments.
================ Comment at: clang/test/AST/Interp/lambda.cpp:5 +constexpr int a = 12; +constexpr int f = [c = a]() { return c; }(); +static_assert(f == a); ---------------- Fun case ``` int constexpr f() { return [x = 10] { decltype(x) y; // type int b/c not odr use // refers to original init-capture auto &z = x; // type const int & b/c odr use // refers to lambdas copy of x y = 10; // Ok //z = 10; // Ill-formed return y; }(); } constexpr int x = f(); ``` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146030/new/ https://reviews.llvm.org/D146030 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits