[cfe-commits] r137222 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/IdentifierTable.h include/clang/Sema/Sema.h lib/Sema/SemaDeclObjC.cpp test/SemaObjC/class-protocol-method-match.m test/SemaObjC/dist-object-modifiers.m test/SemaObjC/qualified-protocol-method-conflicts.m

jahanian fjahanian at apple.com
Wed Aug 10 10:31:07 PDT 2011


On Aug 10, 2011, at 10:25 AM, Douglas Gregor wrote:

> 
> On Aug 10, 2011, at 10:16 AM, Fariborz Jahanian wrote:
> 
>> Author: fjahanian
>> Date: Wed Aug 10 12:16:30 2011
>> New Revision: 137222
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=137222&view=rev
>> Log:
>> objective-c: Using existing infrastructure for finding 
>> overridden  methods to diagnose their type mismatch.
>> This is a general solution for previous fixes
>> for // rdar://6191214 and // rdar://9352731
>> and removes lots of duplicate code.
> 
> Just one non-code comment, based on this:
> 
> @@ -2828,6 +2606,13 @@
> 
>    // Then merge the declarations.
>    mergeObjCMethodDecls(ObjCMethod, overridden);
> +    
> +    // Check for overriding methods
> +    if (isa<ObjCInterfaceDecl>(ObjCMethod->getDeclContext()) || 
> +        isa<ObjCImplementationDecl>(ObjCMethod->getDeclContext())) {
> +      WarnConflictingTypedMethods(ObjCMethod, overridden,
> +              isa<ObjCProtocolDecl>(overridden->getDeclContext()), true);
> +    }
>  }
> 
> When reverting recent, large change in favor of a much smaller solution, it would be really helpful if you could perform the revert as a separate commit, first, and note in the log message that a better implementation is coming. Then, as a second commit, implement the new, much-improved solution. It took a lot of searching to find that snippet above, and that's after I knew where it should have gone :)

Yes. Sorry about that and thanks for pointing me to the existing infrastructure in place.

- Fariborz

> 
> 	- Doug




More information about the cfe-commits mailing list