Return to problem list

ID: 5086425

URL: rdar://problem/5086425

Title: #define objCmethod: Xcode completion list shows definition rather than macro

Originated Date: 24-Mar-2007

State: Open

Fixed? No

Attachments: CodeSenseDefine.zip

Description:

Summary: We sometimes use #define macros for Objective-C method names. For example, we use them to obscure the code for hackers. However, Xcode code completion interprets the macros and gives the definition in the list rather than the defined symbol. This defeats the whole purpose of macros, which is to use the defined symbol throughout your code and have the defined symbol replaced by the definition at build time. This bug does not seem to occur for other kinds of macros, such as function and constant macros. Steps to Reproduce: (1) Open attached Xcode project CodeSenseDefine. (2) Open JJObject.h in project. (3) Notice the macro #define myShortMethod myVeryLongMethodNameThatIDontWantToEnterManually (3) Open CodeSenseDefine.m in project. (4) Insert cursor after [anObject my (5) Bring up code completion list. Expected Results: The list should contain myShortMethod. Actual Results: The list contains myVeryLongMethodNameThatIDontWantToEnterManually but not myShortMethod. Regression: No regression testing done. Notes: I've attached the sample Xcode project as the file CodeSenseDefine.zip.

Return to problem list