aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

I think the changes should come with a release note so users know about the 
improved user experience (it would be great to show the code example from this 
patch summary in the release notes with the explanation you gave). Overall, I 
think this gives reasonable diagnostic behavior (I expect it to roughly be a 
wash in terms of showing the "best" order -- some will improve, some will 
degrade) but the ability to make the sets sortable without triggering checked 
STL diagnostics is definitely an improvement. Thanks!



================
Comment at: clang/lib/Sema/SemaOverload.cpp:11817-11819
+      if (int Ord = CompareConversions(*L, *R)) {
+        return Ord < 0;
+      }
----------------
Coding style nit.


================
Comment at: clang/lib/Sema/SemaOverload.cpp:11872-11874
+        if (int Ord = CompareConversions(*L, *R)) {
+          return Ord < 0;
         }
----------------



================
Comment at: clang/lib/Sema/SemaOverload.cpp:11927-11928
+      // We intend StaticObjectArgumentConversion to compare the same as
+      // StandardConversion with ICR_ExactMatch rank.
+      // Default give us that.
+      return {};
----------------



================
Comment at: clang/lib/Sema/SemaOverload.cpp:11955
+    // FIXME: find a way to compare templates for being more or less
+    // specialized that provides a weak ordering.
+    return 0;
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159351/new/

https://reviews.llvm.org/D159351

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to