[cfe-dev] Message send to super

Steve Naroff snaroff at apple.com
Mon May 5 11:22:40 PDT 2008

Hi David,

As Chris said, this isn't great. The AST reflects a "quick hack" to  
avoid making API changes (which required more thought). I should have  
put a FIXME in the code.

Are you going to clean this up? If not, I am happy to put it on my  
todo list.

Let me know,


On May 2, 2008, at 5:15 PM, David Chisnall wrote:

> Hi,
> It appears that, in generating the AST, the following expression:
> [super msg];
> is being translated to:
> [(superclass*)self msg];
> Running clang -ast-print confirms this.  These two expressions have
> completely different semantics in Objective-C, and since there appears
> to be no way of determining whether the user actually performed a cast
> on self (which is uncommon, but does happen in real code) or sent a
> message to super (which happens a lot more frequently).
> Can anyone suggest a way of distinguishing these two?  If not, is it
> possible to introduce a separate kind of AST node, or a flag in the
> ObjCMessageExpr indicating if super is the receiver?  I have now
> written the code to produce the correct output for the GNU runtime
> with this kind of expression, but am currently unable to connect it to
> anything.
> David
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

More information about the cfe-dev mailing list