aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Rewriter
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-05-08 23:47:40 +0000
committerNico Weber <nicolasweber@gmx.de>2013-05-08 23:47:40 +0000
commit4e8626f708df60abd71a205b4abbd3be04f121ee (patch)
tree2f15e95dab576af628d15a052490e9e430453646 /clang/test/Rewriter
parent1054bbf08d171e3d39d4a8589f149f638eda07ed (diff)
downloadllvm-4e8626f708df60abd71a205b4abbd3be04f121ee.zip
llvm-4e8626f708df60abd71a205b4abbd3be04f121ee.tar.gz
llvm-4e8626f708df60abd71a205b4abbd3be04f121ee.tar.bz2
Objective-C: Correctly encode 'retain' and 'copy' for readonly properties.
clang would omit 'C' for 'copy' properties and '&' for 'retain' properties if the property was also 'readonly'. Fix this, which makes clang match gcc4.2's behavior. Fixes PR15928. llvm-svn: 181491
Diffstat (limited to 'clang/test/Rewriter')
-rw-r--r--clang/test/Rewriter/objc-modern-property-attributes.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Rewriter/objc-modern-property-attributes.mm b/clang/test/Rewriter/objc-modern-property-attributes.mm
index abebb2c..f0d002c 100644
--- a/clang/test/Rewriter/objc-modern-property-attributes.mm
+++ b/clang/test/Rewriter/objc-modern-property-attributes.mm
@@ -16,6 +16,10 @@ typedef void (^void_block_t)(void);
@property (copy) void_block_t completionBlock;
@property (retain) PropertyClass* Yblock;
+@property (readonly) PropertyClass* readonlyAttr;
+@property (readonly,copy) PropertyClass* readonlyCopyAttr;
+@property (readonly,retain) PropertyClass* readonlyRetainAttr;
+@property (readonly,retain,nonatomic) PropertyClass* readonlyNonatomicAttr;
@property (copy) id ID;
@end
@@ -25,6 +29,10 @@ typedef void (^void_block_t)(void);
@dynamic r; // attributes should be "Ti,D"
@synthesize completionBlock=__completion; // "T@?,C,V__completion"
@synthesize Yblock = YVAR; // "T@\"PropertyClass\",&,VYVAR"
+@synthesize readonlyAttr;
+@synthesize readonlyCopyAttr;
+@synthesize readonlyRetainAttr;
+@synthesize readonlyNonatomicAttr;
@synthesize ID; // "T@,C,VID"
@end
@@ -32,6 +40,10 @@ typedef void (^void_block_t)(void);
// CHECK: Ti,D
// CHECK: T@?,C,V__completion
// CHECK: T@\"PropertyClass\",&,VYVAR
+// CHECK: T@\"PropertyClass\",R,VreadonlyAttr
+// CHECK: T@\"PropertyClass\",R,C,VreadonlyCopyAttr
+// CHECK: T@\"PropertyClass\",R,&,VreadonlyRetainAttr
+// CHECK: T@\"PropertyClass\",R,&,N,VreadonlyNonatomicAttr
@interface Test @end
@interface Test (Category)