[llvm-branch-commits] [cfe-branch] r119236 - in /cfe/branches/Apple/whitney: lib/Rewrite/RewriteObjC.cpp test/Rewriter/rewrite-block-pointer.mm

Daniel Dunbar daniel at zuster.org
Mon Nov 15 13:45:12 PST 2010


Author: ddunbar
Date: Mon Nov 15 15:45:12 2010
New Revision: 119236

URL: http://llvm.org/viewvc/llvm-project?rev=119236&view=rev
Log:
Merge r118208:
--
Author: Fariborz Jahanian <fjahanian at apple.com>
Date:   Wed Nov 3 23:50:34 2010 +0000

    Fixes a rewriting bug when type in a  block argument type
    is a objc qualified class type. // rdar: //8608902

Modified:
    cfe/branches/Apple/whitney/lib/Rewrite/RewriteObjC.cpp
    cfe/branches/Apple/whitney/test/Rewriter/rewrite-block-pointer.mm

Modified: cfe/branches/Apple/whitney/lib/Rewrite/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Rewrite/RewriteObjC.cpp?rev=119236&r1=119235&r2=119236&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Rewrite/RewriteObjC.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Rewrite/RewriteObjC.cpp Mon Nov 15 15:45:12 2010
@@ -4901,10 +4901,14 @@
   }
   if (FTP) {
     for (FunctionProtoType::arg_type_iterator I = FTP->arg_type_begin(),
-         E = FTP->arg_type_end(); I != E; ++I)
-      if ((*I)->isObjCQualifiedIdType() ||
-          (*I)->isObjCQualifiedInterfaceType())
+         E = FTP->arg_type_end(); I != E; ++I) {
+      if ((*I)->isObjCQualifiedIdType())
         return true;
+      if ((*I)->isObjCObjectPointerType() &&
+          (*I)->getPointeeType()->isObjCQualifiedInterfaceType())
+        return true;
+    }
+        
   }
   return false;
 }

Modified: cfe/branches/Apple/whitney/test/Rewriter/rewrite-block-pointer.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/Rewriter/rewrite-block-pointer.mm?rev=119236&r1=119235&r2=119236&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/test/Rewriter/rewrite-block-pointer.mm (original)
+++ cfe/branches/Apple/whitney/test/Rewriter/rewrite-block-pointer.mm Mon Nov 15 15:45:12 2010
@@ -78,3 +78,7 @@
 			void(^arg1)(), int i1, void(^arg)(id<CoreDAVAccountInfoProvider>),
                         int success, id<CoreDAVAccountInfoProvider, CodeProvider> Info);
 
+
+ at interface I @end
+ at interface INTF @end
+void (^BLINT)(I<CoreDAVAccountInfoProvider>* ARG, INTF<CodeProvider, CoreDAVAccountInfoProvider>* ARG1);





More information about the llvm-branch-commits mailing list