diff --git a/clang-tools-extra/clang-query/QueryParser.cpp b/clang-tools-extra/clang-query/QueryParser.cpp index db4b9a4b0530..a980722de9e6 100644 --- a/clang-tools-extra/clang-query/QueryParser.cpp +++ b/clang-tools-extra/clang-query/QueryParser.cpp @@ -26,7 +26,7 @@ namespace query { // is found before End, return StringRef(). Begin is adjusted to exclude the // lexed region. StringRef QueryParser::lexWord() { - Line = Line.drop_while([this](char c) { + Line = Line.drop_while([](char c) { // Don't trim newlines. return StringRef(" \t\v\f\r").contains(c); }); diff --git a/clang/lib/ASTMatchers/Dynamic/Parser.cpp b/clang/lib/ASTMatchers/Dynamic/Parser.cpp index 1781f2a6439f..77c9629f6f85 100644 --- a/clang/lib/ASTMatchers/Dynamic/Parser.cpp +++ b/clang/lib/ASTMatchers/Dynamic/Parser.cpp @@ -297,7 +297,7 @@ private: /// Consume all leading whitespace from \c Code. void consumeWhitespace() { - Code = Code.drop_while([this](char c) { + Code = Code.drop_while([](char c) { // Don't trim newlines. return StringRef(" \t\v\f\r").contains(c); });