[llvm-branch-commits] [libc++] Annotate classes with _LIBCPP_PFP to enable pointer field protection (PR #151652)

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Apr 7 06:55:18 PDT 2026


================
@@ -303,7 +303,7 @@ using __shared_ptr_nullptr_deleter_ctor_reqs _LIBCPP_NODEBUG =
 #endif
 
 template <class _Tp>
-class _LIBCPP_SHARED_PTR_TRIVIAL_ABI shared_ptr {
+class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_PFP shared_ptr {
----------------
ldionne wrote:

Is there a way to assert that PFP is enabled for a type? It would be nice to add a test in `libcxx/test/libcxx/extensions` if we can.

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


More information about the llvm-branch-commits mailing list