[Sema] Stable sort OverloadCandidates to remove non-deterministic ordering

Summary: This fixes failure in Misc/diag-template-diffing.cpp uncovered by D39245.

Reviewers: rjmccall, rsmith

Reviewed By: rjmccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D39944

llvm-svn: 318121
This commit is contained in:
Mandeep Singh Grang 2017-11-14 00:22:24 +00:00
parent ffcfd923d7
commit e66d232c05
1 changed files with 1 additions and 1 deletions

View File

@ -10516,7 +10516,7 @@ void OverloadCandidateSet::NoteCandidates(
}
}
std::sort(Cands.begin(), Cands.end(),
std::stable_sort(Cands.begin(), Cands.end(),
CompareOverloadCandidatesForDisplay(S, OpLoc, Args.size(), Kind));
bool ReportedAmbiguousConversions = false;