diff options
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 7 | ||||
| -rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index db8e74ec94c..cf0221542f2 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -228,12 +228,11 @@ RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const { if (Found) { Comment = MaybeBeforeDecl + 1; - assert(Comment == std::lower_bound(RawComments.begin(), RawComments.end(), - &CommentAtDeclLoc, Compare)); + assert(Comment == + llvm::lower_bound(RawComments, &CommentAtDeclLoc, Compare)); } else { // Slow path. - Comment = std::lower_bound(RawComments.begin(), RawComments.end(), - &CommentAtDeclLoc, Compare); + Comment = llvm::lower_bound(RawComments, &CommentAtDeclLoc, Compare); } } diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 6195d5fa664..a5793ce3aad 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -1450,10 +1450,8 @@ CXXRecordDecl::getLambdaExplicitTemplateParameters() const { [](const NamedDecl *D) { return !D->isImplicit(); }) && "Explicit template params should be ordered before implicit ones"); - const auto ExplicitEnd = std::lower_bound(List->begin(), List->end(), false, - [](const NamedDecl *D, bool) { - return !D->isImplicit(); - }); + const auto ExplicitEnd = llvm::partition_point( + *List, [](const NamedDecl *D) { return !D->isImplicit(); }); return llvm::makeArrayRef(List->begin(), ExplicitEnd); } |

