[clang-tools-extra] r364720 - Cleanup: llvm::bsearch -> llvm::partition_point after r364719
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 30 04:19:56 PDT 2019
Author: maskray
Date: Sun Jun 30 04:19:56 2019
New Revision: 364720
URL: http://llvm.org/viewvc/llvm-project?rev=364720&view=rev
Log:
Cleanup: llvm::bsearch -> llvm::partition_point after r364719
Modified:
clang-tools-extra/trunk/clangd/index/Symbol.cpp
Modified: clang-tools-extra/trunk/clangd/index/Symbol.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/Symbol.cpp?rev=364720&r1=364719&r2=364720&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/Symbol.cpp (original)
+++ clang-tools-extra/trunk/clangd/index/Symbol.cpp Sun Jun 30 04:19:56 2019
@@ -35,8 +35,8 @@ float quality(const Symbol &S) {
}
SymbolSlab::const_iterator SymbolSlab::find(const SymbolID &ID) const {
- auto It =
- llvm::bsearch(Symbols, [&](const Symbol &S) { return !(S.ID < ID); });
+ auto It = llvm::partition_point(Symbols,
+ [&](const Symbol &S) { return S.ID < ID; });
if (It != Symbols.end() && It->ID == ID)
return It;
return Symbols.end();
More information about the cfe-commits
mailing list