Fix rewriting of property declared in @protocol's.

Fixed //rdar://8472487.

llvm-svn: 114741
This commit is contained in:
Fariborz Jahanian 2010-09-24 18:36:58 +00:00
parent 61464fa6e7
commit aa0f2b3016
2 changed files with 13 additions and 0 deletions

View 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 */");

View 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