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 :)

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to