================ @@ -195,3 +195,16 @@ prevent compilers from generating said debug information. Aliases inside type tr should be annotated for the same reason. This is enforced by the clang-tidy check ``libcpp-nodebug-on-aliases``. + +Pointer field protection +======================== + +To improve the effectiveness of Clang's `pointer field protection +<https://clang.llvm.org/docs/StructureProtection.html>`_ feature, +commonly used vocabulary types with pointer fields are marked with the +``_LIBCPP_PFP`` attribute, to give Clang permission to use PFP to protect +their pointer fields. Newly added vocabulary types should be marked with +this attribute if they contain pointer fields. ---------------- pcc wrote:
That was an oversight; now added. Technically, `basic_string::__long` is the type that needs to be annotated because that's the one with a pointer field, so that's what I did. I also improved the wording here to clarify that internal base classes and fields need the annotations if they have pointer fields. https://github.com/llvm/llvm-project/pull/151652 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
