[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 11 06:24:36 PDT 2023
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
More information about the cfe-commits
mailing list