aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvan Haas <evan@lagerdata.com>2024-07-30 16:47:10 -0700
committerEvan Haas <evan@lagerdata.com>2024-07-31 09:35:07 -0700
commit4300a9c417cb9344d65e74335c9ce09cbf9bfc17 (patch)
tree0697d26c6b3ca58a3f52e2fd23a95247c1986136 /test
parent5cc9e18277e1b166be0898255448f3c642759bbc (diff)
downloadzig-4300a9c417cb9344d65e74335c9ce09cbf9bfc17.tar.gz
zig-4300a9c417cb9344d65e74335c9ce09cbf9bfc17.zip
aro_translate_c: Make function decls public
Diffstat (limited to 'test')
-rw-r--r--test/cases/translate_c/function prototype with parenthesis.c10
-rw-r--r--test/translate_c.zig10
2 files changed, 10 insertions, 10 deletions
diff --git a/test/cases/translate_c/function prototype with parenthesis.c b/test/cases/translate_c/function prototype with parenthesis.c
new file mode 100644
index 0000000000..7b93e3fa93
--- /dev/null
+++ b/test/cases/translate_c/function prototype with parenthesis.c
@@ -0,0 +1,10 @@
+void (f0) (void *L);
+void ((f1)) (void *L);
+void (((f2))) (void *L);
+
+// translate-c
+// c_frontend=clang,aro
+//
+// pub extern fn f0(L: ?*anyopaque) void;
+// pub extern fn f1(L: ?*anyopaque) void;
+// pub extern fn f2(L: ?*anyopaque) void;
diff --git a/test/translate_c.zig b/test/translate_c.zig
index c07b29f772..31bb577f00 100644
--- a/test/translate_c.zig
+++ b/test/translate_c.zig
@@ -494,16 +494,6 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
\\};
});
- cases.add("function prototype with parenthesis",
- \\void (f0) (void *L);
- \\void ((f1)) (void *L);
- \\void (((f2))) (void *L);
- , &[_][]const u8{
- \\pub extern fn f0(L: ?*anyopaque) void;
- \\pub extern fn f1(L: ?*anyopaque) void;
- \\pub extern fn f2(L: ?*anyopaque) void;
- });
-
cases.add("array initializer w/ typedef",
\\typedef unsigned char uuid_t[16];
\\static const uuid_t UUID_NULL __attribute__ ((unused)) = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};