[cfe-commits] r118208 - in /cfe/trunk: lib/Rewrite/RewriteObjC.cpp test/Rewriter/rewrite-block-pointer.mm
Fariborz Jahanian
fjahanian at apple.com
Wed Nov 3 16:50:34 PDT 2010
Author: fjahanian
Date: Wed Nov 3 18:50:34 2010
New Revision: 118208
URL: http://llvm.org/viewvc/llvm-project?rev=118208&view=rev
Log:
Fixes a rewriting bug when type in a block argument type
is a objc qualified class type. // rdar: //8608902
Modified:
cfe/trunk/lib/Rewrite/RewriteObjC.cpp
cfe/trunk/test/Rewriter/rewrite-block-pointer.mm
Modified: cfe/trunk/lib/Rewrite/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteObjC.cpp?rev=118208&r1=118207&r2=118208&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteObjC.cpp Wed Nov 3 18:50:34 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/trunk/test/Rewriter/rewrite-block-pointer.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-block-pointer.mm?rev=118208&r1=118207&r2=118208&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-block-pointer.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-block-pointer.mm Wed Nov 3 18:50:34 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 cfe-commits
mailing list