[cfe-commits] r64672 - in /cfe/trunk: lib/AST/ASTContext.cpp test/CodeGenObjC/objc2-property-encode.m

Chris Lattner clattner at apple.com
Mon Feb 16 13:49:31 PST 2009


On Feb 16, 2009, at 1:41 PM, Fariborz Jahanian wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=64672&view=rev
> Log:
> Fixes a bug in property type encoding.

Hi Fariborz,

> +++ cfe/trunk/lib/AST/ASTContext.cpp Mon Feb 16 15:41:04 2009
> @@ -2085,7 +2085,8 @@
>       return;
>     }
>     else if (PointeeTy->isObjCInterfaceType()) {
> -      if (dyn_cast<TypedefType>(PointeeTy.getTypePtr())) {
> +      if (!EncodingProperty &&
> +          dyn_cast<TypedefType>(PointeeTy.getTypePtr())) {

Random point: please use "isa<TypedefType>" here.  "dyn_cast" should  
only be used when you want the result as a pointer.  Thanks!

-Chris




More information about the cfe-commits mailing list