summaryrefslogtreecommitdiff
path: root/tools/libclang
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-03-31 08:48:19 +0000
committerFangrui Song <maskray@google.com>2019-03-31 08:48:19 +0000
commitce76f242a3a88b0a44c9567eff34aea2441dad56 (patch)
tree5c3579db6d4fb2a528f882bcf668b190ef8ef9be /tools/libclang
parent3d1e9bf72f37efa62ae9a036d596f496137663b2 (diff)
downloadclang-ce76f242a3a88b0a44c9567eff34aea2441dad56.tar.gz
Range-style std::find{,_if} -> llvm::find{,_if}. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang')
-rw-r--r--tools/libclang/CIndexHigh.cpp6
-rw-r--r--tools/libclang/CXCursor.cpp8
2 files changed, 6 insertions, 8 deletions
diff --git a/tools/libclang/CIndexHigh.cpp b/tools/libclang/CIndexHigh.cpp
index 83193872b2..04699ccb01 100644
--- a/tools/libclang/CIndexHigh.cpp
+++ b/tools/libclang/CIndexHigh.cpp
@@ -109,16 +109,14 @@ struct FindFileIdRefVisitData {
private:
bool isOverriddingMethod(const Decl *D) const {
- if (std::find(TopMethods.begin(), TopMethods.end(), D) !=
- TopMethods.end())
+ if (llvm::find(TopMethods, D) != TopMethods.end())
return true;
TopMethodsTy methods;
getTopOverriddenMethods(TU, D, methods);
for (TopMethodsTy::iterator
I = methods.begin(), E = methods.end(); I != E; ++I) {
- if (std::find(TopMethods.begin(), TopMethods.end(), *I) !=
- TopMethods.end())
+ if (llvm::find(TopMethods, *I) != TopMethods.end())
return true;
}
diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp
index 907f8cf1cd..f26d97f86b 100644
--- a/tools/libclang/CXCursor.cpp
+++ b/tools/libclang/CXCursor.cpp
@@ -109,8 +109,8 @@ CXCursor cxcursor::MakeCXCursor(const Decl *D, CXTranslationUnit TU,
RegionOfInterest.getBegin() == RegionOfInterest.getEnd()) {
SmallVector<SourceLocation, 16> SelLocs;
cast<ObjCMethodDecl>(D)->getSelectorLocs(SelLocs);
- SmallVectorImpl<SourceLocation>::iterator
- I=std::find(SelLocs.begin(), SelLocs.end(),RegionOfInterest.getBegin());
+ SmallVectorImpl<SourceLocation>::iterator I =
+ llvm::find(SelLocs, RegionOfInterest.getBegin());
if (I != SelLocs.end())
SelectorIdIndex = I - SelLocs.begin();
}
@@ -562,8 +562,8 @@ CXCursor cxcursor::MakeCXCursor(const Stmt *S, const Decl *Parent,
RegionOfInterest.getBegin() == RegionOfInterest.getEnd()) {
SmallVector<SourceLocation, 16> SelLocs;
cast<ObjCMessageExpr>(S)->getSelectorLocs(SelLocs);
- SmallVectorImpl<SourceLocation>::iterator
- I=std::find(SelLocs.begin(), SelLocs.end(),RegionOfInterest.getBegin());
+ SmallVectorImpl<SourceLocation>::iterator I =
+ llvm::find(SelLocs, RegionOfInterest.getBegin());
if (I != SelLocs.end())
SelectorIdIndex = I - SelLocs.begin();
}