aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC/encode-test.m
diff options
context:
space:
mode:
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);
+}