[LLVMbugs] [Bug 12322] New: -Wselector incorrectly warns about unimplemented selectors
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 21 09:41:04 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12322
Bug #: 12322
Summary: -Wselector incorrectly warns about unimplemented
selectors
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: tjw at me.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8247
--> http://llvm.org/bugs/attachment.cgi?id=8247
test case
The attached test warns that -localizedStandardCompare: isn't implemented.
First off, it doesn't say what object it expects to implement the selector, but
more importantly it shouldn't warn here (it can't know what the elements of the
array implement). It *could* warn if -localizedStandardCompare: was not defined
on any object, but Foundation.h is imported and NSString defines this method.
Note also that the C version of the method in the test case does *not* warn.
This itself may be a bug (C code not getting properly checked for warnings), or
maybe it is behaving correctly and the ObjC code is buggy. Either way, both
should behave the same in this case.
clang version 3.1 (trunk 152932) (llvm/trunk 152930)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
--
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