On Aug 8, 2011, at 10:32 AM, David Chisnall wrote: > Author: theraven > Date: Mon Aug 8 12:32:19 2011 > New Revision: 137053 > > URL: http://llvm.org/viewvc/llvm-project?rev=137053&view=rev > Log: > Silence the category-replacing-class-method warning for +load: category > implementations of +load do not replace the class definition in a meaningful > sense, they are run when the category loads, the +load method for class is run > when the class is loaded. > > > Modified: > cfe/trunk/lib/Sema/SemaDeclObjC.cpp > > Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=137053&r1=137052&r2=137053&view=diff > ============================================================================== > --- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original) > +++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Aug 8 12:32:19 2011 > @@ -1311,6 +1311,9 @@ > } > if (match) > match = (ImpMethodDecl->isVariadic() == MethodDecl->isVariadic()); > + if (match) > + match = !(MethodDecl->isClassMethod() && > + MethodDecl->getSelector() == GetNullarySelector("load", > Context));
Selector should probably have some sort of isUnarySelector(StringRef) method which you could use here. John. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
