From baf889c87913b08f444291242e0c170b1aad14f4 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 14 Feb 2016 16:14:30 -0700 Subject: parseh: fix __cdecl causing a fn ptr to be double ptr --- test/run_tests.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/run_tests.cpp') 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) { -- cgit v1.2.3