summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC/class-getter-dotsyntax.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-03-10 18:03:11 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-03-10 18:03:11 +0000
commit3523d4f59eb0aa1f200dcb943093ecfe75008735 (patch)
treed87fe28137732cfc503a472f3eec963e07faff85 /test/CodeGenObjC/class-getter-dotsyntax.m
parent4a77edb3f0fabc8e214a3d5636c4d0aff031645c (diff)
ir-gen support for class getter/setter call
using property dot-syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC/class-getter-dotsyntax.m')
-rw-r--r--test/CodeGenObjC/class-getter-dotsyntax.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGenObjC/class-getter-dotsyntax.m b/test/CodeGenObjC/class-getter-dotsyntax.m
new file mode 100644
index 0000000000..54ed890cc4
--- /dev/null
+++ b/test/CodeGenObjC/class-getter-dotsyntax.m
@@ -0,0 +1,21 @@
+// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+
+@interface Test { }
++ (Test *)crash;
++ (void)setCrash: (int)value;
+@end
+
+@implementation Test
+static int _value;
+- (void)cachesPath
+{
+ static Test *cachesPath;
+
+ if (!cachesPath) {
+ Test *crash = Test.crash;
+ }
+}
++ (Test *)crash{ return 0; }
++ (void)setCrash: (int)value{ _value = value; }
+@end
+