[cfe-commits] r95744 - in /cfe/trunk: lib/Frontend/RewriteObjC.cpp test/Rewriter/rewrite-category-property.mm

Fariborz Jahanian fjahanian at apple.com
Tue Feb 9 17:15:10 PST 2010


Author: fjahanian
Date: Tue Feb  9 19:15:09 2010
New Revision: 95744

URL: http://llvm.org/viewvc/llvm-project?rev=95744&view=rev
Log:
Comment out category's property decls. in rewrite.
Fixes radar 7630636.

Added:
    cfe/trunk/test/Rewriter/rewrite-category-property.mm
Modified:
    cfe/trunk/lib/Frontend/RewriteObjC.cpp

Modified: cfe/trunk/lib/Frontend/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/RewriteObjC.cpp?rev=95744&r1=95743&r2=95744&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteObjC.cpp Tue Feb  9 19:15:09 2010
@@ -867,6 +867,10 @@
   // 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)

Added: cfe/trunk/test/Rewriter/rewrite-category-property.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-category-property.mm?rev=95744&view=auto

==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-category-property.mm (added)
+++ cfe/trunk/test/Rewriter/rewrite-category-property.mm Tue Feb  9 19:15:09 2010
@@ -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
+
+ at class Y, Z;
+
+ at interface A
+ at property (readonly) Y *y;
+ at end
+
+ at interface A (cat)
+ at property (readonly) Z *z;
+ at end
+
+// CHECK-LP: // @property (readonly) Z *z;





More information about the cfe-commits mailing list