http://llvm.org/bugs/show_bug.cgi?id=18908
Bug ID: 18908
Summary: False positive when using a category on NSMutableArray
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
There seems to be a false positive in the current Xcode versions of the static
analyser (Xcode 5.0.2/5A3005 and 5.1/5B103i)
The warning is: "Arguments to 'NSMutableArray' method 'addObject:safe:' cannot
be nil"
The line with the warning is:
[myMutableArray addObject:someObjectThatCouldBeNil safe:YES];
This method is not part of Apples Code but added through a category by us:
- (void) addObject:(id)anObject safe:(BOOL)value {
if (value) {
if (anObject) {
return [self addObject:anObject];
}
return;
}
return [self addObject:anObject];
}
The code seems fine to me as we check for nil values.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs