diff --git a/clang/unittests/Format/TokenAnnotatorTest.cpp b/clang/unittests/Format/TokenAnnotatorTest.cpp index 33a320f7bb06e..1ee209444067d 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); };