[clangd] Use drop_front instead of consume_front to get rid of a redundant check

This commit is contained in:
Kadir Cetinkaya 2020-06-19 14:13:01 +02:00
parent dfafba3989
commit 3bd7acf2e5
No known key found for this signature in database
GPG Key ID: E39E36B8D2057ED6
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ extractSystemIncludes(PathRef Driver, llvm::StringRef Lang,
});
if (Found == std::end(ArgsToPreserve))
continue;
Arg.consume_front(*Found);
Arg = Arg.drop_front(Found->size());
if (Arg.empty() && I + 1 < E) {
Args.push_back(CommandLine[I]);
Args.push_back(CommandLine[++I]);