[PATCH] D154417: [libc++] Disable tree invariant check in asserts mode

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 4 06:42:45 PDT 2023


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1e35e93e30c2: [libc++] Disable tree invariant check in asserts mode (authored by hans).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154417

Files:
  libcxx/include/__tree


Index: libcxx/include/__tree
===================================================================
--- libcxx/include/__tree
+++ libcxx/include/__tree
@@ -376,7 +376,8 @@
 {
     _LIBCPP_ASSERT_UNCATEGORIZED(__root != nullptr, "Root node should not be null");
     _LIBCPP_ASSERT_UNCATEGORIZED(__z != nullptr, "The node to remove should not be null");
-    _LIBCPP_ASSERT_UNCATEGORIZED(std::__tree_invariant(__root), "The tree invariants should hold");
+    // TODO: Use in the new debug mode:
+    // _LIBCPP_DEBUG_ASSERT(std::__tree_invariant(__root), "The tree invariants should hold");
     // __z will be removed from the tree.  Client still needs to destruct/deallocate it
     // __y is either __z, or if __z has two children, __tree_next(__z).
     // __y will have at most one child.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154417.537083.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230704/61e469e1/attachment.bin>


More information about the cfe-commits mailing list