diff options
author | Sam McCall <sam.mccall@gmail.com> | 2024-03-15 21:53:37 +0100 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2024-03-15 21:55:37 +0100 |
commit | ca4c4a6758d184f209cb5d88ef42ecc011b11642 (patch) | |
tree | 26a54c9b191abc5733e8327512b57f3955b8e346 /clang/lib/CodeGen/CGCall.cpp | |
parent | a4610c7182d35093e9e0fde5be91659a8b9da5b8 (diff) | |
download | llvm-ca4c4a6758d184f209cb5d88ef42ecc011b11642.zip llvm-ca4c4a6758d184f209cb5d88ef42ecc011b11642.tar.gz llvm-ca4c4a6758d184f209cb5d88ef42ecc011b11642.tar.bz2 |
Revert "[clang][nullability] allow _Nonnull etc on nullable class types (#82705)"
This reverts commit 92a09c0165b87032e1bd05020a78ed845cf35661.
This is triggering a bunch of new -Wnullability-completeness warnings
in code with existing raw pointer nullability annotations.
The intent was the new nullability locations wouldn't affect those
warnings, so this is a bug at least for now.
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 17607fe..a28d788 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -4372,8 +4372,7 @@ void CodeGenFunction::EmitNonNullArgCheck(RValue RV, QualType ArgType, NNAttr = getNonNullAttr(AC.getDecl(), PVD, ArgType, ArgNo); bool CanCheckNullability = false; - if (SanOpts.has(SanitizerKind::NullabilityArg) && !NNAttr && PVD && - !PVD->getType()->isRecordType()) { + if (SanOpts.has(SanitizerKind::NullabilityArg) && !NNAttr && PVD) { auto Nullability = PVD->getType()->getNullability(); CanCheckNullability = Nullability && *Nullability == NullabilityKind::NonNull && |