[all-commits] [llvm/llvm-project] 53f11d: [libc++] Avoid type-punning between __value_type a...

Nikolas Klauser via All-commits all-commits at lists.llvm.org
Thu May 15 00:02:17 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 53f11dd4d60ad416cfeaabaf59a33d7754a8f1f1
      https://github.com/llvm/llvm-project/commit/53f11dd4d60ad416cfeaabaf59a33d7754a8f1f1
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2025-05-15 (Thu, 15 May 2025)

  Changed paths:
    M libcxx/include/__fwd/pair.h
    M libcxx/include/__memory/uses_allocator_construction.h
    M libcxx/include/__node_handle
    M libcxx/include/__tree
    M libcxx/include/map
    M libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp
    M libcxx/utils/gdb/libcxx/printers.py

  Log Message:
  -----------
  [libc++] Avoid type-punning between __value_type and pair (#134819)

Before this patch, we were dereferencing pointers to objects which were
never constructed. Now we always assume that nodes store `pair<const
KeyT, ValueT>` for maps instead, as they actually do. This patch also
allows for significant follow-up simplifications, since
`__node_value_type` and `__container_value_type` are the same type now.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list