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

Mandeep Singh Grang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 11 22:37:52 PST 2017


mgrang created this revision.
mgrang added a project: clang.

This fixes failure in Misc/diag-template-diffing.cpp uncovered by https://reviews.llvm.org/D39245.


https://reviews.llvm.org/D39944

Files:
  lib/Sema/SemaOverload.cpp


Index: lib/Sema/SemaOverload.cpp
===================================================================
--- lib/Sema/SemaOverload.cpp
+++ lib/Sema/SemaOverload.cpp
@@ -10516,7 +10516,7 @@
     }
   }
 
-  std::sort(Cands.begin(), Cands.end(),
+  std::stable_sort(Cands.begin(), Cands.end(),
             CompareOverloadCandidatesForDisplay(S, OpLoc, Args.size(), Kind));
 
   bool ReportedAmbiguousConversions = false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39944.122598.patch
Type: text/x-patch
Size: 416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171112/3587e9d7/attachment.bin>


More information about the cfe-commits mailing list