[PATCH] D142743: Fix nullability checking of top-level functions
Christopher Bazley via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 27 08:57:13 PST 2023
chrisbazley created this revision.
Herald added subscribers: steakhal, martong.
Herald added a reviewer: NoQ.
Herald added a project: All.
chrisbazley requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
The existing nullability checker is so limited
when applied to top-level functions that a casual
observer might assume it doesn't work at all:
void test1(int *_Nullable x)
{
*x = 5; // no warning!
}
Added a NullabilityChecker::checkBeginFunction method
to honour any _Nullable annotation of parameters in
a top-level call.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142743
Files:
clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142743.492792.patch
Type: text/x-patch
Size: 4046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230127/533ff7f9/attachment.bin>
More information about the cfe-commits
mailing list