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/CodeGenFunction.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/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 8e4dc89..4a3ff49 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -979,8 +979,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, // return value. Initialize the flag to 'true' and refine it in EmitParmDecl. if (SanOpts.has(SanitizerKind::NullabilityReturn)) { auto Nullability = FnRetTy->getNullability(); - if (Nullability && *Nullability == NullabilityKind::NonNull && - !FnRetTy->isRecordType()) { + if (Nullability && *Nullability == NullabilityKind::NonNull) { if (!(SanOpts.has(SanitizerKind::ReturnsNonnullAttribute) && CurCodeDecl && CurCodeDecl->getAttr<ReturnsNonNullAttr>())) RetValNullabilityPrecondition = |