Comment out category's property decls. in rewrite.

Fixes radar 7630636.

llvm-svn: 95744
This commit is contained in:
Fariborz Jahanian 2010-02-10 01:15:09 +00:00
parent 1b5330afe9
commit 68ebe63865
2 changed files with 19 additions and 0 deletions

View File

@ -867,6 +867,10 @@ void RewriteObjC::RewriteCategoryDecl(ObjCCategoryDecl *CatDecl) {
// FIXME: handle category headers that are declared across multiple lines.
ReplaceText(LocStart, 0, "// ", 3);
for (ObjCCategoryDecl::prop_iterator I = CatDecl->prop_begin(),
E = CatDecl->prop_end(); I != E; ++I)
RewriteProperty(*I);
for (ObjCCategoryDecl::instmeth_iterator
I = CatDecl->instmeth_begin(), E = CatDecl->instmeth_end();
I != E; ++I)

View File

@ -0,0 +1,15 @@
// RUN: %clang_cc1 -x objective-c++ -fms-extensions -rewrite-objc %s -o %t-rw.cpp
// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
// radar 7630636
@class Y, Z;
@interface A
@property (readonly) Y *y;
@end
@interface A (cat)
@property (readonly) Z *z;
@end
// CHECK-LP: // @property (readonly) Z *z;