[LLVMbugs] [Bug 12322] -Wselector incorrectly warns about unimplemented selectors

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 28 16:51:47 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12322

Fariborz Jahanian <fjahanian at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |fjahanian at apple.com
         Resolution|                            |WORKSFORME

--- Comment #2 from Fariborz Jahanian <fjahanian at apple.com> 2012-03-28 18:51:47 CDT ---
-Wselector has been borrowed from gcc and clang tries to closely match gcc's
behavior.

Here are the rules as implemented by gcc and adopted in clang:

1) There must be at least one class implementation for -Wselector to warn.

2) selector used in @selector expression must be implemented in current
translation unit. 
    The fact that -localizedStandardCompare has been declared in NSString does
not prevent 
    -Wselector from warning. It must be implemented as well.

3) Reason that there is one warning and not two is because this warning is not
repeated for each use of
    same selector in multiple @selector expressions.

> Cloned to <rdar://problem/11102778>.

-- 
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