[clang] [analyzer] Report violations of the "returns_nonnull" attribute (PR #106048)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 26 06:38:56 PDT 2024
================
@@ -692,6 +692,14 @@ void NullabilityChecker::checkPreStmt(const ReturnStmt *S,
NullConstraint Nullness = getNullConstraint(*RetSVal, State);
Nullability RequiredNullability = getNullabilityAnnotation(RequiredRetType);
+ if (const auto *FunDecl = C.getLocationContext()->getDecl();
----------------
NagyDonat wrote:
Why isn't this logic added as a part of `getNullabilityAnnotation`? (I'm just curious, I can easily imagine that there is a good reason for that.)
https://github.com/llvm/llvm-project/pull/106048
More information about the cfe-commits
mailing list