r318121 - [Sema] Stable sort OverloadCandidates to remove non-deterministic ordering
Mandeep Singh Grang via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 13 16:22:24 PST 2017
Author: mgrang
Date: Mon Nov 13 16:22:24 2017
New Revision: 318121
URL: http://llvm.org/viewvc/llvm-project?rev=318121&view=rev
Log:
[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
Modified:
cfe/trunk/lib/Sema/SemaOverload.cpp
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=318121&r1=318120&r2=318121&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Mon Nov 13 16:22:24 2017
@@ -10516,7 +10516,7 @@ void OverloadCandidateSet::NoteCandidate
}
}
- std::sort(Cands.begin(), Cands.end(),
+ std::stable_sort(Cands.begin(), Cands.end(),
CompareOverloadCandidatesForDisplay(S, OpLoc, Args.size(), Kind));
bool ReportedAmbiguousConversions = false;
More information about the cfe-commits
mailing list