Commit ceeda9f0 authored by Fangrui Song's avatar Fangrui Song
Browse files

[clangd] Fix Fix -Wunused-lambda-capture after r366339

llvm-svn: 366400
parent 4e8d07fd
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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 {};