<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - No way to override hard-coded Objective-C identifiers (class name or selectors)"
href="http://llvm.org/bugs/show_bug.cgi?id=17613">17613</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>No way to override hard-coded Objective-C identifiers (class name or selectors)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>drawtree@me.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>