-
- Downloads
[analyzer] Nullability: Don't warn along paths where null returned from non-null.
Change the nullability checker to not warn along paths where null is returned from a method with a non-null return type, even when the diagnostic for this return has been suppressed. This prevents warning from methods with non-null return types that inline methods that themselves return nil but that suppressed the diagnostic. Also change the PreconditionViolated state component to be called "InvariantViolated" because it is set when a post-condition is violated, as well. rdar://problem/25393539 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264647 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp 79 additions, 55 deletionslib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
- test/Analysis/Inputs/system-header-simulator-for-nullability.h 3 additions, 2 deletions...Analysis/Inputs/system-header-simulator-for-nullability.h
- test/Analysis/nullability-no-arc.mm 55 additions, 0 deletionstest/Analysis/nullability-no-arc.mm
Loading
Please register or sign in to comment