diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-14 16:14:30 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-14 16:14:30 -0700 |
| commit | baf889c87913b08f444291242e0c170b1aad14f4 (patch) | |
| tree | a71b79db04b201cd0ab459e9a52cf32cc6c7cd98 /test/run_tests.cpp | |
| parent | 87922bfae0cbb90bd8e05a00c51a0c737ef3245f (diff) | |
| download | zig-baf889c87913b08f444291242e0c170b1aad14f4.tar.gz zig-baf889c87913b08f444291242e0c170b1aad14f4.zip | |
parseh: fix __cdecl causing a fn ptr to be double ptr
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index 6f73d99648..2d78cd9a72 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -1928,6 +1928,10 @@ extern void (*fn_ptr)(void); add_parseh_case("#define string", R"SOURCE( #define foo "a string" )SOURCE", 1, "pub const foo = c\"a string\";"); + + add_parseh_case("__cdecl doesn't mess up function pointers", R"SOURCE( +void foo(void (__cdecl *fn_ptr)(void)); + )SOURCE", 1, "pub extern fn foo(fn_ptr: ?extern fn());"); } static void run_self_hosted_test(void) { |
