[clang] cf3421d - [Format] Fix a warning
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 11 12:09:08 PST 2024
Author: Kazu Hirata
Date: 2024-01-11T12:09:01-08:00
New Revision: cf3421de587d7c947e8f6b5c754393f85a395747
URL: https://github.com/llvm/llvm-project/commit/cf3421de587d7c947e8f6b5c754393f85a395747
DIFF: https://github.com/llvm/llvm-project/commit/cf3421de587d7c947e8f6b5c754393f85a395747.diff
LOG: [Format] Fix a warning
This patch fixes:
clang/unittests/Format/TokenAnnotatorTest.cpp:2181:29: error: lambda
capture 'Style' is not used [-Werror,-Wunused-lambda-capture]
Added:
Modified:
clang/unittests/Format/TokenAnnotatorTest.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Format/TokenAnnotatorTest.cpp b/clang/unittests/Format/TokenAnnotatorTest.cpp
index 33a320f7bb06e6..1ee209444067d6 100644
--- a/clang/unittests/Format/TokenAnnotatorTest.cpp
+++ b/clang/unittests/Format/TokenAnnotatorTest.cpp
@@ -2178,7 +2178,7 @@ TEST_F(TokenAnnotatorTest, UnderstandTableGenTokens) {
TestLexer Lexer(Allocator, Buffers, Style);
AdditionalKeywords Keywords(Lexer.IdentTable);
- auto Annotate = [&Lexer, &Style](llvm::StringRef Code) {
+ auto Annotate = [&Lexer](llvm::StringRef Code) {
return Lexer.annotate(Code);
};
More information about the cfe-commits
mailing list