[libcxx-commits] [libcxx] [libc++] Add assumption for align of begin and end pointers of vector. (PR #108961)

Hans Wennborg via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 28 10:37:30 PST 2025


================
@@ -775,6 +780,17 @@ class _LIBCPP_TEMPLATE_VIS vector {
   }
 
   _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector&, false_type) _NOEXCEPT {}
+
+  static _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer __add_alignment_assumption(pointer __p) _NOEXCEPT {
----------------
zmodem wrote:

Similarly to https://github.com/llvm/llvm-project/pull/118837#pullrequestreview-2578321015 I think this one needs `_LIBCPP_NO_CFI` since we're potentially static_cast'ing uninitialized memory (for the end pointer).

(Apologies for the late notice, we're a bit behind on libc++.)

https://github.com/llvm/llvm-project/pull/108961


More information about the libcxx-commits mailing list