[llvm-branch-commits] [clang] [Clang] Add pointer field protection feature. (PR #133538)

Peter Collingbourne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 5 19:43:14 PST 2025


================
@@ -3141,6 +3141,17 @@ defm experimental_omit_vtable_rtti : BoolFOption<"experimental-omit-vtable-rtti"
   NegFlag<SetFalse, [], [CC1Option], "Do not omit">,
   BothFlags<[], [CC1Option], " the RTTI component from virtual tables">>;
 
+defm experimental_pointer_field_protection : BoolFOption<"experimental-pointer-field-protection",
+  LangOpts<"PointerFieldProtection">, DefaultFalse,
+  PosFlag<SetTrue, [], [CC1Option], "Enable">,
+  NegFlag<SetFalse, [], [], "Do not enable">,
+  BothFlags<[], [ClangOption], " pointer field protection on all non-standard layout struct types">>;
+defm experimental_pointer_field_protection_tagged : BoolFOption<"experimental-pointer-field-protection-tagged",
----------------
pcc wrote:

Done

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


More information about the llvm-branch-commits mailing list