False-positive with CLANG_ANALYZER_NONNULL
| Originator: | adigitalknight | ||
| Number: | rdar://24187233 | Date Originated: | 14-Jan-2016 10:14 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Reproducible: |
Summary:
CLANG_ANALYZER_NONNULL with Xcode 7.3 Beta 1 is giving false-positive warnings.
Steps to Reproduce:
static NSString * const stringArray[] = { @"http://example.net" };
+ (void)load {
if (stringArray[0]) {
}
[NSURL URLWithString:stringArray[0]];
}
Expected Results:
No warning
Actual Results:
Warning "Null passed to a callee that requires a non-null argument"
Version:
Xcode Version 7.3 beta (7D111g)
OS X beta 10.11.4 (15E27e)
Configuration:
flag CLANG_ANALYZER_NONNULL
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Also reported on https://llvm.org/bugs/show_bug.cgi?id=26143