[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 08:47:24 PST 2025


================
@@ -598,7 +598,7 @@ struct S1 {
 };
 
 void foo1() {
-  auto s0 = S1([name=]() {}); // expected-error {{expected expression}}
+  auto s0 = S1([]() {}); // Remove invalid capture, no diagnostic expected
----------------
erichkeane wrote:

why change the test?  this one seemed like a useful diagnostic, and one I'd like to see.

https://github.com/llvm/llvm-project/pull/117953


More information about the cfe-commits mailing list