[cfe-commits] r128435 - in /cfe/trunk: lib/CodeGen/CGObjC.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaExprObjC.cpp lib/Sema/SemaObjCProperty.cpp test/SemaObjCXX/references.mm

John McCall rjmccall at apple.com
Mon Mar 28 16:57:33 PDT 2011


On Mar 28, 2011, at 4:47 PM, Fariborz Jahanian wrote:
> @@ -539,7 +538,10 @@
>                                       SelfExpr, true, true);
>       ObjCMethodDecl::param_iterator P = setterMethod->param_begin();
>       ParmVarDecl *Param = (*P);
> -      Expr *rhs = new (Context) DeclRefExpr(Param, Param->getType(),
> +      QualType T = Param->getType();
> +      if (T->isReferenceType())
> +        T = cast<ReferenceType>(T)->getPointeeType();

The type of this parameter comes straight from the @property
declaration, right?  That can be sugared; please use getAs<> here.

Also, we should check to ensure that we don't synthesize ivars for these.

John.



More information about the cfe-commits mailing list