summaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/encode-test.m
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-02-01 21:35:00 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-02-01 21:35:00 +0000
commit123063377428540752bad91c7fbd536a762e31bd (patch)
treef131a156bf0b3912bc02dd7adaf4898c01c8a119 /test/CodeGenObjC/encode-test.m
parentd1b6c770bea9b3da66c6c1eb9a7c483ed7e55c1e (diff)
Notes
Diffstat (limited to 'test/CodeGenObjC/encode-test.m')
-rw-r--r--test/CodeGenObjC/encode-test.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenObjC/encode-test.m b/test/CodeGenObjC/encode-test.m
index 7f0e76fc3ffd..a1f88e05250a 100644
--- a/test/CodeGenObjC/encode-test.m
+++ b/test/CodeGenObjC/encode-test.m
@@ -180,3 +180,14 @@ const char g14[] = @encode(__typeof__(*test_id));
// CHECK: @g15 = constant [2 x i8] c":\00"
const char g15[] = @encode(SEL);
+
+typedef typeof(sizeof(int)) size_t;
+size_t strlen(const char *s);
+
+// CHECK-LABEL: @test_strlen(
+// CHECK: %[[i:.*]] = alloca i32
+// CHECK: store i32 1, i32* %[[i]]
+void test_strlen() {
+ const char array[] = @encode(int);
+ int i = strlen(array);
+}