[llvm-bugs] [Bug 26143] New: False-positive with CLANG_ANALYZER_NONNULL
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jan 14 06:18:22 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26143
Bug ID: 26143
Summary: False-positive with CLANG_ANALYZER_NONNULL
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: coeur at gmx.fr
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15632
--> https://llvm.org/bugs/attachment.cgi?id=15632&action=edit
warning with code
Summary:
CLANG_ANALYZER_NONNULL with Xcode 7.3 Beta 1 is giving false-positive warnings.
Steps to Reproduce:
static NSString *stringArray[] = {
@"http://example.net"
};
+ (void)load {
[[[self alloc] init] useIndex:0];
}
- (void)useIndex:(int)index {
if (stringArray[index]) {
}
NSURL *url = [NSURL URLWithString:stringArray[index]];
NSLog(@"%@", url);
}
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)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160114/331198c2/attachment.html>
More information about the llvm-bugs
mailing list