summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-10-16 17:51:43 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-10-16 17:51:43 +0000
commit2eaec611ac23f387b8fc0ab3b28191519888ffba (patch)
treedefe6f539b813496a93f81e34417ecf4dcc833d6 /clang/test
parentac07c8dae7ce595b3e77d2de291fda97a1a70278 (diff)
downloadbcm5719-llvm-2eaec611ac23f387b8fc0ab3b28191519888ffba.tar.gz
bcm5719-llvm-2eaec611ac23f387b8fc0ab3b28191519888ffba.zip
ObjectiveC++: support for passing C++11 style initialized temporaries to
objc++ properties using property-dot syntax. // rdar://14654207 llvm-svn: 192819
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaObjCXX/properties.mm31
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/test/SemaObjCXX/properties.mm b/clang/test/SemaObjCXX/properties.mm
index 36f59b650ce..7bb4fab3d3f 100644
--- a/clang/test/SemaObjCXX/properties.mm
+++ b/clang/test/SemaObjCXX/properties.mm
@@ -172,3 +172,34 @@ namespace test10 {
@implementation PropertyOfItself
@synthesize x;
@end
+
+// rdar://14654207
+struct CGSize {
+ double width;
+ double height;
+};
+typedef struct CGSize CGSize;
+
+struct CGRect {
+ CGSize origin;
+ CGSize size;
+};
+typedef struct CGRect CGRect;
+
+typedef CGRect NSRect;
+void HappySetFrame(NSRect frame) {}
+
+__attribute__((objc_root_class))
+@interface NSObject
+@property CGRect frame;
+@end
+
+@implementation NSObject
+- (void) nothing
+{
+ HappySetFrame({{0,0}, {13,14}});
+ [self setFrame: {{0,0}, {13,14}}];
+ self.frame = {{0,0}, {13,14}};
+ self.frame = (CGRect){{3,5}, {13,14}};
+}
+@end
OpenPOWER on IntegriCloud