From 2c7a72acc7bb49874819838be7359007f3979549 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Wed, 4 Jan 2017 19:16:29 +0000 Subject: [PATCH] [Sema] Replace remove_if+erase with erase_if. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290991 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaCUDA.cpp | 6 ++---- lib/Sema/SemaOverload.cpp | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/Sema/SemaCUDA.cpp b/lib/Sema/SemaCUDA.cpp index 6f272ec839..282633bbc9 100644 --- a/lib/Sema/SemaCUDA.cpp +++ b/lib/Sema/SemaCUDA.cpp @@ -228,10 +228,8 @@ void Sema::EraseUnwantedCUDAMatches( [&](const Pair &M1, const Pair &M2) { return GetCFP(M1) < GetCFP(M2); })); // Erase all functions with lower priority. - Matches.erase( - llvm::remove_if( - Matches, [&](const Pair &Match) { return GetCFP(Match) < BestCFP; }), - Matches.end()); + llvm::erase_if(Matches, + [&](const Pair &Match) { return GetCFP(Match) < BestCFP; }); } /// When an implicitly-declared special member has to invoke more than one diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 47e3df20d9..b5c0e634fa 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -8958,9 +8958,7 @@ OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc, S.IdentifyCUDAPreference(Caller, Cand->Function) == Sema::CFP_WrongSide; }; - Candidates.erase(std::remove_if(Candidates.begin(), Candidates.end(), - IsWrongSideCandidate), - Candidates.end()); + llvm::erase_if(Candidates, IsWrongSideCandidate); } } -- 2.40.0