[llvm-branch-commits] [libc++] Annotate classes with _LIBCPP_PFP to enable pointer field protection (PR #151652)
Peter Collingbourne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 7 11:19:57 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 {
----------------
pcc wrote:
Not explicitly, but we could assert that the type is non-standard-layout if the pfp feature is enabled (the feature itself will be added in #152414). I've added a test that does that.
https://github.com/llvm/llvm-project/pull/151652
More information about the llvm-branch-commits
mailing list