http://llvm.org/bugs/show_bug.cgi?id=17613
Bug ID: 17613
Summary: No way to override hard-coded Objective-C identifiers
(class name or selectors)
Product: clang
Version: 3.3
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Clang has several hard-coded identifiers for Objective-C.
I think at least these identifiers are hard-coded and cannot be overridden. (or
at least the overriding method is not well known)
- Classes for literal. (`NSNumber`, `NSString`, `NSArray`, `NSDictionary`)
- Selectors to create literal. (such as `numberWithInt:` ??? I have no idea for
strings)
- Selectors to access some syntax. (such as `objectForKeyedSubscript:`)
- Protocol and selector for for..in loop. (`NSFastEnumeration`)
Some of them can be overridden using `@compatibility_alias` keyword, but it's
just workaround, not a ultimate solution.
Currently, AFAIK, the only way to override this is modifying compiler source
code.
And this discourages writing completely new framework/library from scratch by
forcing some source-level compatibility to Apple's Foundation framework.
It would be great if these identifiers can be overridden at compile time via
command-line parameters or configuration files.
I don't know how `libclang` handles this, but if `libclang` can override these
identifiers, I think that would be awesome.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs