<div dir="ltr">Good point!  Thanks!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 17, 2024 at 3:34 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">In general, if the lambda is only used within its scope, I'd suggest switching to a default ref capture "[&]" to reduce maintenance burden of keeping the capture list up to date.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 11, 2024 at 12:09 PM Kazu Hirata via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Kazu Hirata<br>
Date: 2024-01-11T12:09:01-08:00<br>
New Revision: cf3421de587d7c947e8f6b5c754393f85a395747<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/cf3421de587d7c947e8f6b5c754393f85a395747" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/cf3421de587d7c947e8f6b5c754393f85a395747</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/cf3421de587d7c947e8f6b5c754393f85a395747.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/cf3421de587d7c947e8f6b5c754393f85a395747.diff</a><br>
<br>
LOG: [Format] Fix a warning<br>
<br>
This patch fixes:<br>
<br>
  clang/unittests/Format/TokenAnnotatorTest.cpp:2181:29: error: lambda<br>
  capture 'Style' is not used [-Werror,-Wunused-lambda-capture]<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    clang/unittests/Format/TokenAnnotatorTest.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/clang/unittests/Format/TokenAnnotatorTest.cpp b/clang/unittests/Format/TokenAnnotatorTest.cpp<br>
index 33a320f7bb06e6..1ee209444067d6 100644<br>
--- a/clang/unittests/Format/TokenAnnotatorTest.cpp<br>
+++ b/clang/unittests/Format/TokenAnnotatorTest.cpp<br>
@@ -2178,7 +2178,7 @@ TEST_F(TokenAnnotatorTest, UnderstandTableGenTokens) {<br>
<br>
   TestLexer Lexer(Allocator, Buffers, Style);<br>
   AdditionalKeywords Keywords(Lexer.IdentTable);<br>
-  auto Annotate = [&Lexer, &Style](llvm::StringRef Code) {<br>
+  auto Annotate = [&Lexer](llvm::StringRef Code) {<br>
     return Lexer.annotate(Code);<br>
   };<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>
</blockquote></div>