================
@@ -892,6 +892,11 @@ namespace lambdas {
return a1.x;
});
A a2([&] { return a2.x; }); // ok
+ A a3([=] { return a3.x; }()); // expected-warning{{variable 'a3' is
uninitialized when used within its own initialization}}
----------------
zhaohuiw42 wrote:
I think not, `SelfReferenceChecker` only checks whether the declaration is
evaluated in its own initialization, an additional value-tracking mechanism is
needed for the case you mentioned.
https://github.com/llvm/llvm-project/pull/129198
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits