]> granicus.if.org Git - clang/commitdiff
[Sema] Replace remove_if+erase with erase_if. NFC.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Wed, 4 Jan 2017 19:16:29 +0000 (19:16 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Wed, 4 Jan 2017 19:16:29 +0000 (19:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290991 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaCUDA.cpp
lib/Sema/SemaOverload.cpp

index 6f272ec839f5330ede8dd59ab338e3f8f54fe9f3..282633bbc9e1604ab3321295eff4e12ec509f286 100644 (file)
@@ -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
index 47e3df20d9111fb36ec02aeff13fe8d84b98b318..b5c0e634fa504491f29386b1f49dfe1d465f9102 100644 (file)
@@ -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);
     }
   }