-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
songruiwang
committed
Jul 6, 2023
1 parent
ab49d30
commit b22a5d4
Showing
3 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters