[libcxx-commits] [PATCH] D100134: [libc++] Fix std::type_info comparison

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 17 10:38:15 PDT 2021


Mordante added a comment.

Seems the Windows build fails, can you look why the XFAIL doesn't work.



================
Comment at: libcxx/include/typeinfo:269
+      // and non-unique type_infos are ordered by their string comparison
+      // amongst themselves.
+      bool __lhs_unique = __is_type_name_unique(__lhs);
----------------
I love this kind of comment, however it's now duplicated here and in the implementation. Would it make sense to move this comment in the implementation so we have only one copy?


================
Comment at: libcxx/test/std/language.support/support.rtti/type.info/type_info.order.sh.cpp:1
+//===----------------------------------------------------------------------===//
+//
----------------
ldionne wrote:
> This is my best attempt at trying to test this, but TBH I'm not sure how good it is.
Also not to sure how good it is. Can we test whether the order is different in the TUs? Would it help to run the test with different linker orders for TU1 and TU2? e.g. TU1 TU2 MAIN and TU2 TU1 MAIN.


================
Comment at: libcxx/test/std/language.support/support.rtti/type.info/type_info.order.sh.cpp:36
+template <typename Container>
+void check_total_order(Container const& elements) {
+  for (auto const& a : elements) {
----------------
Is there a reason to put this function here instead of in MAIN?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100134



More information about the libcxx-commits mailing list