Skip to content
Commit b22a5d46 authored by songruiwang's avatar songruiwang
Browse files

[analyzer] Fix false negative when pass implicit cast nil to nonnull

We should look through implicit casts before determining the type of the arguments, and only allow explicit cast to _Nonnull to suppress warning

```
void foo(NSString *_Nonnull);

foo((NSString * _Nonnull)nil); // no-warning
id obj = nil;
foo(obj); // should warning here (implicit cast id to NSString *_Nonnull)

```

Reviewed By: xazax.hun, steakhal

Differential Revision: https://reviews.llvm.org/D154221
parent ab49d305
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment