[analyzer] Do not report NSError null dereference for _Nonnull params.
authorValeriy Savchenko <vsavchenko@apple.com>
Wed, 8 Apr 2020 15:58:40 +0000 (18:58 +0300)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 20 Apr 2020 09:33:01 +0000 (12:33 +0300)
commit09a1f090509eb5971ade7089330008c6e4024d30
treee5fe85d5e4f8bd882ae5e04d1e9fedca5d2c9976
parentfa284e136e1b67e233f445fcf643eeaa10d6835c
[analyzer] Do not report NSError null dereference for _Nonnull params.

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 NullabilityChecker as it already tracks non-null types.

Patch by Valeriy Savchenko!

Differential Revision: https://reviews.llvm.org/D77722
clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
clang/test/Analysis/CheckNSError.m