[cfe-dev] Should ObjCMethodDecl::getCanonicalDecl search superclass?

Kevin Cathey kcathey2 at illinois.edu
Tue Oct 13 21:46:17 PDT 2009


Furthermore, if I have:
@interface MyClass {
}
@end

@interface MyClass ()
- (void)someOtherCategoryMethod;
@end

@implementation MyClass
- (void)someOtherCategoryMethod {
}
@end

I would expect the canonical decl for someOtherCategoryMethod in the implementation of MyClass to be the declaration in the required category.

Kevin

-------------------------------------------------
Kevin Cathey
Department of Computer Science - College of Engineering
University of Illinois Urbana Champaign


On 13 Oct 2009, at 23:28, Kevin Cathey wrote:

> Should the getCanonicalDecl method on ObjCMethodDecl also search its superclasses? For example, if I have the following:
> 
> @interface MyBaseClass <MyProtocol> {
> }
> - (void)method1;
> @end
> 
> @interface MyClass : MyBaseClass {
> }
> - (void)method2:(id)argument;
> @end
> 
> @implementation MyClass
> - (void)method1 {
> }
> 
> - (void)method2:(id)argument {
> }
> @end
> 
> I would expect that in the implementation of MyClass, that the canonical decl for both methods 1 and 2 should be their definitions in MyClass and MyBaseClass. Currently, only method2 resolves to the declaration. method1 returns itself.
> 
> Kevin
> 
> -------------------------------------------------
> Kevin Cathey
> Department of Computer Science - College of Engineering
> University of Illinois Urbana Champaign
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091013/b2c0d903/attachment.html>


More information about the cfe-dev mailing list