[clangd] Fix Fix -Wunused-lambda-capture after r366339
authorFangrui Song <maskray@google.com>
Thu, 18 Jul 2019 04:23:54 +0000 (04:23 +0000)
committerFangrui Song <maskray@google.com>
Thu, 18 Jul 2019 04:23:54 +0000 (04:23 +0000)
llvm-svn: 366400

clang-tools-extra/clangd/QueryDriverDatabase.cpp

index bdb928b..28596da 100644 (file)
@@ -58,14 +58,13 @@ namespace {
 
 std::vector<std::string> parseDriverOutput(llvm::StringRef Output) {
   std::vector<std::string> SystemIncludes;
-  constexpr char const *SIS = "#include <...> search starts here:";
+  const char SIS[] = "#include <...> search starts here:";
   constexpr char const *SIE = "End of search list.";
   llvm::SmallVector<llvm::StringRef, 8> Lines;
   Output.split(Lines, '\n', /*MaxSplit=*/-1, /*KeepEmpty=*/false);
 
-  auto StartIt =
-      std::find_if(Lines.begin(), Lines.end(),
-                   [SIS](llvm::StringRef Line) { return Line.trim() == SIS; });
+  auto StartIt = llvm::find_if(
+      Lines, [SIS](llvm::StringRef Line) { return Line.trim() == SIS; });
   if (StartIt == Lines.end()) {
     elog("System include extraction: start marker not found: {0}", Output);
     return {};