From the Xcode Docs:
Syntax highlighting, code completion, and every other index-driven feature is handled by the LLVM parser. If the compiler knows about a symbol, so does the Xcode IDE.
but none of these "index-driven features" are working for me when writing code inside of a preprocessor directive. Does anyone have a solution for this?
Examples:
When building with Unused Parameter warnings turned on, tons of warnings are generated even when said parameter is used. The code in this specific screenshot is from Apples Reachability.m
and is unmodified. Notice that syntax highlighting is also nonexistent here:
Correct completion inside #if
:
But, incorrect completion inside #else
:
It half works with local variables:
But breaks again when calling something declared outside of the current method scope:
Another example
Another example
Can anyone please tell me how (or even if) this can be fixed?
Turns out this was a bug and is now fixed in Xcode Version 4.3.1 (4E1019).