summaryrefslogtreecommitdiffstats
path: root/test/SemaObjCXX/properties.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/properties.mm')
-rw-r--r--test/SemaObjCXX/properties.mm24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaObjCXX/properties.mm b/test/SemaObjCXX/properties.mm
new file mode 100644
index 0000000..f148b33
--- /dev/null
+++ b/test/SemaObjCXX/properties.mm
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+struct X {
+ void f() const;
+ ~X();
+};
+
+@interface A {
+ X x_;
+}
+
+- (const X&)x;
+- (void)setx:(const X&)other;
+@end
+
+@implementation A
+
+- (const X&)x { return x_; }
+- (void)setx:(const X&)other { x_ = other; }
+- (void)method {
+ self.x.f();
+}
+@end
+
OpenPOWER on IntegriCloud