[LLVMbugs] [Bug 9360] New: false positive warning with NSFastEnumeration and Obj-C for..in loop
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Mar 1 14:10:17 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9360
Summary: false positive warning with NSFastEnumeration and
Obj-C for..in loop
Product: new-bugs
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sean at rogue-research.com
CC: llvmbugs at cs.uiuc.edu
In r126782 compiling this:
-----------------
#import <Cocoa/Cocoa.h>
int main (int argc, char *argv[])
{
(void)argc; (void)argv;
NSObject<NSFastEnumeration>* collection = nil;
for (id thing in collection) { }
return 0;
}
-----------------
reports:
test.m:8:2: warning: collection expression type 'NSObject<NSFastEnumeration> *'
may not respond to
'countByEnumeratingWithState:objects:count:'
for (id thing in collection) { }
^ ~~~~~~~~~~
That's gotta be a false positive because that's exactly the only method
declared by NSFastEnumeration. gcc does not warn.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list