================
@@ -92,14 +94,14 @@ namespace ImplicitCapture {
     [] { return ref_i; }; // expected-error {{variable 'ref_i' cannot be 
implicitly captured in a lambda with no capture-default specified}} 
expected-note {{lambda expression begins here}} expected-note 2 {{capture 
'ref_i' by}} expected-note 2 {{default capture by}}
 
     static int j;
-    int &ref_j = j;
-    [] { return ref_j; }; // ok
+    int &ref_j = j; // cxx03-fixme-note {{declared here}}
+    [] { return ref_j; }; // cxx03-fixme-error {{variable 'ref_j' cannot be 
implicitly captured in a lambda with no capture-default specified}} 
cxx03-fixme-note 4 {{capture}} cxx03-fixme-note {{lambda expression begins 
here}}
----------------
philnik777 wrote:

I don't really understand this failure. It would be great if someone could 
point me at the logic for allowing the capture of `ref_j`.

https://github.com/llvm/llvm-project/pull/73376
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to