[PATCH] D77806: [analyzer] Do not report CFError null dereference for nonnull params
Valeriy Savchenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 9 07:34:58 PDT 2020
vsavchenko created this revision.
vsavchenko added reviewers: NoQ, dcoughlin.
Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, JDevlieghere, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: clang.
We want to trust user type annotations and stop assuming pointers declared
as nonnull still can be null. This functionality is implemented as part
of NonNullParamChecker because it already checks parameter attributes.
Whenever we start analyzing a new function, we assume that all parameters
with 'nonnull' attribute are indeed non-null.
Depends on D77722 <https://reviews.llvm.org/D77722>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77806
Files:
clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp
clang/test/Analysis/CheckNSError.m
clang/test/Analysis/nonnull.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77806.256299.patch
Type: text/x-patch
Size: 9315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200409/796d5c82/attachment.bin>
More information about the cfe-commits
mailing list