[cfe-commits] r79365 - in /cfe/trunk: include/clang/AST/ include/clang/Frontend/ lib/AST/ lib/Analysis/ lib/CodeGen/ lib/Frontend/ lib/Sema/
Chris Lattner
clattner at apple.com
Wed Aug 19 21:28:08 PDT 2009
On Aug 18, 2009, at 1:50 PM, Fariborz Jahanian wrote:
> Author: fjahanian
> Date: Tue Aug 18 15:50:23 2009
> New Revision: 79365
>
> URL: http://llvm.org/viewvc/llvm-project?rev=79365&view=rev
> Log:
> Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
> Removed an unnecessary loop to get to setters incoming
> argument. Added DoxyGen comments. Still more work
> to do in this area (WIP).
Thanks Fariborz! How about "ObjCImplicitSetterGetterRefExpr" instead
of "ObjCImplctSetterGetterRefExpr"?
> +/// ObjCImplctSetterGetterRefExpr - A dot-syntax expression to
> access two
> +/// methods; one to set a value to an 'ivar' (Setter) and the other
> to access
> +/// an 'ivar' (Setter).
> +/// An example for use of this AST is:
> +/// @code
> +/// @interface Test { }
> +/// - (Test *)crash;
> +/// - (void)setCrash: (Test*)value;
> +/// @end
> +/// void foo(Test *p1, Test *p2)
> +/// {
> +/// p2.crash = p1.crash; // Uses ObjCImplctSetterGetterRefExpr
> AST
> +/// }
> +/// @endcode
Very nice! Can the 'base' be null? If so, what does that mean and
when does it happen?
> +class ObjCImplctSetterGetterRefExpr : public Expr {
> + /// Setter - Setter method user declared for setting its 'ivar'
> to a value
> ObjCMethodDecl *Setter;
> + /// Getter - Getter method user declared for accessing 'ivar' it
> controls.
> ObjCMethodDecl *Getter;
Are the getter and setter always non-null?
> SourceLocation Loc;
> // FIXME: Swizzle these into a single pointer.
> @@ -272,22 +283,23 @@
> SourceLocation ClassLoc;
Please rename and comment the "Loc" fields to indicate what they are
the loc of.
-Chris
More information about the cfe-commits
mailing list