[llvm-branch-commits] [clang] [Clang] Add pointer field protection feature. (PR #172119)
Oliver Hunt via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Dec 20 23:33:59 PST 2025
================
@@ -6639,6 +6639,10 @@ static void handleZeroCallUsedRegsAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
D->addAttr(ZeroCallUsedRegsAttr::Create(S.Context, Kind, AL));
}
+static void handleNoPFPAttrField(Sema &S, Decl *D, const ParsedAttr &AL) {
+ D->addAttr(NoFieldProtectionAttr::Create(S.Context, AL));
----------------
ojhunt wrote:
maybe check for the attribute not being on a field? I don't know if that's generally something we warn on, but I feel we complain about attributes being in the wrong place so maybe complaining here is reasonable?
https://github.com/llvm/llvm-project/pull/172119
More information about the llvm-branch-commits
mailing list