On Apr 23, 2013, at 12:16 , Argyrios Kyrtzidis <[email protected]> wrote:
> On Apr 23, 2013, at 12:03 PM, Jordan Rose <[email protected]> wrote: > >> Sorry, why is this right way to implement this? 'self' is very deliberately >> not a special kind of expression in Objective-C. Why not expose this on the >> associated ParmVarDecl instead? > > What is the advantage with that approach ? Whether there is a ParmVarDecl or > not seems like an implementation detail of the AST. If you are worried that > there is one more cursor to consider, I'd argue the same applies for > CXCursor_CXXThisExpr. CXXThisExpr matches the AST, which matches the C++ standard. There is no Objective-C standard, but certainly 'self' is not treated specially in most cases. I can't put my finger on it, but it makes a lot more sense to me to say "is this variable 'self'?" than "is this expression 'self'?", especially in init methods where 'self' can be reassigned. 'this' can never be reassigned. Jordan
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
