]> granicus.if.org Git - clang/commitdiff
Fix rewriting of property declared in @protocol's.
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 24 Sep 2010 18:36:58 +0000 (18:36 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 24 Sep 2010 18:36:58 +0000 (18:36 +0000)
Fixed //rdar://8472487.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114741 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Rewrite/RewriteObjC.cpp
test/Rewriter/rewrite-protocol-qualified.mm

index 578a063614a1b651ba4f8f5c61012d9e29243388..dd6cf93a39957720eca83b56dcd6e5b4788069a0 100644 (file)
@@ -962,6 +962,10 @@ void RewriteObjC::RewriteProtocolDecl(ObjCProtocolDecl *PDecl) {
        I != E; ++I)
     RewriteMethodDeclaration(*I);
 
+  for (ObjCInterfaceDecl::prop_iterator I = PDecl->prop_begin(),
+       E = PDecl->prop_end(); I != E; ++I)
+    RewriteProperty(*I);
+  
   // Lastly, comment out the @end.
   SourceLocation LocEnd = PDecl->getAtEndRange().getBegin();
   ReplaceText(LocEnd, strlen("@end"), "/* @end */");
index 5f12010afd4ecabb4367be565ca939d1ebe30382..671aa6b08a03cca6e463626811b3f0dc47d9eb5e 100644 (file)
@@ -30,3 +30,12 @@ void f() {
         id a;
         id b = bar((id <Proto>)a);
 }
+
+// rdar://8472487
+@protocol NSObject @end
+@class NSRunLoop;
+
+@protocol CoreDAVTaskManager <NSObject> 
+  @property (retain) NSRunLoop *workRunLoop;  
+@end
+