[cfe-commits] r135304 - /cfe/trunk/include/clang/AST/DeclObjC.h

Fariborz Jahanian fjahanian at apple.com
Fri Jul 15 15:10:58 PDT 2011


On Jul 15, 2011, at 2:39 PM, Argyrios Kyrtzidis wrote:

> Author: akirtzidis
> Date: Fri Jul 15 16:39:32 2011
> New Revision: 135304
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=135304&view=rev
> Log:
> The canonical decl for an ObjCImplDecl is it's interface class. Fixes rdar://8728637.

Why? Have do you apply the meaning of a Canonical to an implementation's class? 

- Fariborz

> 
> Modified:
>    cfe/trunk/include/clang/AST/DeclObjC.h
> 
> Modified: cfe/trunk/include/clang/AST/DeclObjC.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=135304&r1=135303&r2=135304&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/AST/DeclObjC.h (original)
> +++ cfe/trunk/include/clang/AST/DeclObjC.h Fri Jul 15 16:39:32 2011
> @@ -1122,6 +1122,12 @@
>       ClassInterface(classInterface) {}
> 
> public:
> +  virtual Decl *getCanonicalDecl() {
> +    if (Decl *interface = getClassInterface())
> +      return interface;
> +    return this;
> +  }
> +
>   const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
>   ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
>   void setClassInterface(ObjCInterfaceDecl *IFace);
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list