]> granicus.if.org Git - clang/commitdiff
Comment out category's property decls. in rewrite.
authorFariborz Jahanian <fjahanian@apple.com>
Wed, 10 Feb 2010 01:15:09 +0000 (01:15 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Wed, 10 Feb 2010 01:15:09 +0000 (01:15 +0000)
Fixes radar 7630636.

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

lib/Frontend/RewriteObjC.cpp
test/Rewriter/rewrite-category-property.mm [new file with mode: 0644]

index d1b098af616fa118c14c3d48e1ec2db482a66475..f5ff5bc3f228809b0a4a424d195331cb48316a4e 100644 (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)
diff --git a/test/Rewriter/rewrite-category-property.mm b/test/Rewriter/rewrite-category-property.mm
new file mode 100644 (file)
index 0000000..6b8f076
--- /dev/null
@@ -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;