summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Sema/SemaCUDA.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaCUDA.cpp b/clang/lib/Sema/SemaCUDA.cpp
index 7e201f4dae6..90af6d5a927 100644
--- a/clang/lib/Sema/SemaCUDA.cpp
+++ b/clang/lib/Sema/SemaCUDA.cpp
@@ -163,8 +163,10 @@ static void EraseUnwantedCUDAMatchesImpl(
[&](const T &M1, const T &M2) { return GetCFP(M1) < GetCFP(M2); }));
// Erase all functions with lower priority.
- Matches.erase(llvm::remove_if(
- Matches, [&](const T &Match) { return GetCFP(Match) < BestCFP; }));
+ Matches.erase(
+ llvm::remove_if(Matches,
+ [&](const T &Match) { return GetCFP(Match) < BestCFP; }),
+ Matches.end());
}
void Sema::EraseUnwantedCUDAMatches(const FunctionDecl *Caller,
OpenPOWER on IntegriCloud