summaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/nontrivial-c-struct-func-name-collision.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/nontrivial-c-struct-func-name-collision.m')
-rw-r--r--test/CodeGenObjC/nontrivial-c-struct-func-name-collision.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenObjC/nontrivial-c-struct-func-name-collision.m b/test/CodeGenObjC/nontrivial-c-struct-func-name-collision.m
new file mode 100644
index 0000000000000..bf512ec88b7fb
--- /dev/null
+++ b/test/CodeGenObjC/nontrivial-c-struct-func-name-collision.m
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios11 -fobjc-arc -fblocks -fobjc-runtime=ios-11.0 -emit-llvm -verify -o - %s
+
+typedef struct { // expected-error {{special function __default_constructor_8_s8 for non-trivial C struct has incorrect type}}
+ int i;
+ id f1;
+} StrongSmall;
+
+int __default_constructor_8_s8(double a) {
+ return 0;
+}
+
+void testIncorrectFunctionType(void) {
+ StrongSmall x;
+}