Skip to content

Commit

Permalink
[Sema] Stable sort OverloadCandidates to remove non-deterministic ord…
Browse files Browse the repository at this point in the history
…ering

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
  • Loading branch information
Mandeep Singh Grang committed Nov 14, 2017
1 parent ffcfd92 commit e66d232
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaOverload.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit e66d232

Please sign in to comment.