[cfe-dev] Objective-C tidy up
Chris Lattner
clattner at apple.com
Tue Jun 3 10:27:35 PDT 2008
On Jun 3, 2008, at 10:23 AM, David Chisnall wrote:
>> ParmVarDecl is an artifact of common implementations, not the way the
>> language works. They are not parameters, as they obviously don't
>> have
>> location info etc.
>
> They are artefacts of both all existing implementations (GNU, Apple,
> and POC) and the language philosophy ('no magic'), and is something
> relied on by a lot of existing code.
I fail to see the point. "this" in C++ has the exact same behavior
and should also be modeled with PredefinedExpr.
> This is in contrast to super, which is an alias for self with
> different semantics (i.e. sending a message to super sends a message
> where the destination class is resolved at compile time, not at
> runtime).
The clang AST currently captures something that is somewhat close to a
parse tree. This helps ensure that we don't bog down nodes with
extraneous data that they shouldn't have. Creating multiple extra
decls for each ObjC method is wasteful and pointless. This really is
an artifact of the implementation, even if the implementation shows
through in certain language constructs.
-Chris
More information about the cfe-dev
mailing list