[clang-tools-extra] 3bd7acf - [clangd] Use drop_front instead of consume_front to get rid of a redundant check
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 19 05:13:18 PDT 2020
Author: Kadir Cetinkaya
Date: 2020-06-19T14:13:08+02:00
New Revision: 3bd7acf2e55801208700663d428ec37f694fb8a4
URL: https://github.com/llvm/llvm-project/commit/3bd7acf2e55801208700663d428ec37f694fb8a4
DIFF: https://github.com/llvm/llvm-project/commit/3bd7acf2e55801208700663d428ec37f694fb8a4.diff
LOG: [clangd] Use drop_front instead of consume_front to get rid of a redundant check
Added:
Modified:
clang-tools-extra/clangd/QueryDriverDatabase.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/QueryDriverDatabase.cpp b/clang-tools-extra/clangd/QueryDriverDatabase.cpp
index 11d74203ae94..ba3aa0d66741 100644
--- a/clang-tools-extra/clangd/QueryDriverDatabase.cpp
+++ b/clang-tools-extra/clangd/QueryDriverDatabase.cpp
@@ -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]);
More information about the cfe-commits
mailing list