[cfe-commits] r115201 - in /cfe/trunk: lib/Rewrite/RewriteObjC.cpp test/Rewriter/rewrite-protocol-qualified.mm
Fariborz Jahanian
fjahanian at apple.com
Thu Sep 30 13:41:32 PDT 2010
Author: fjahanian
Date: Thu Sep 30 15:41:32 2010
New Revision: 115201
URL: http://llvm.org/viewvc/llvm-project?rev=115201&view=rev
Log:
Rewriting array element type of qualified-id.
Fixes rdra://8475819.
Modified:
cfe/trunk/lib/Rewrite/RewriteObjC.cpp
cfe/trunk/test/Rewriter/rewrite-protocol-qualified.mm
Modified: cfe/trunk/lib/Rewrite/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteObjC.cpp?rev=115201&r1=115200&r2=115201&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteObjC.cpp Thu Sep 30 15:41:32 2010
@@ -2109,6 +2109,10 @@
T = T->getPointeeType();
return T->isObjCQualifiedInterfaceType();
}
+ if (T->isArrayType()) {
+ QualType ElemTy = Context->getBaseElementType(T);
+ return needToScanForQualifiers(ElemTy);
+ }
return false;
}
Modified: cfe/trunk/test/Rewriter/rewrite-protocol-qualified.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-protocol-qualified.mm?rev=115201&r1=115200&r2=115201&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-protocol-qualified.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-protocol-qualified.mm Thu Sep 30 15:41:32 2010
@@ -39,3 +39,12 @@
@property (retain) NSRunLoop *workRunLoop;
@end
+
+// rdar://8475819
+ at protocol some_protocol;
+
+void foo (int n)
+{
+ id<some_protocol> array[n];
+}
+
More information about the cfe-commits
mailing list