vsk added inline comments.

================
Comment at: clang/test/SemaCXX/lambda-expressions.cpp:87
+    (void)^{ // expected-error@+1 {{no matching constructor for initialization 
of 'const G'}}
+      return [=]{ // expected-error@+1 {{no matching constructor for 
initialization of 'const G'}}
+        const G* gg = &g; // expected-note {{implicitly capturing 'g', first 
used here}}
----------------
rsmith wrote:
> Why are these @+1?
A 'no matching constructor' error is present on the line containing "[=]" 
(pointing to the '=' sign), as well as on the line containing "gg = &g" 
(pointing to the last 'g').

I'll try to capture that in a neater way.

Stepping back a bit, I think clang does this to make it clear that an implicit 
capture is part of the problem. It does seem strange to me that we'd emit the 
same error twice, but according to baseline version of this test, that's the 
expected behavior. Let me know if I should try and change that diagnostic.


https://reviews.llvm.org/D52064



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to