From be67b4aa2011bb2de0404971c343b1d8a573d823 Mon Sep 17 00:00:00 2001 From: Blaine Garst Date: Wed, 4 Aug 2010 23:34:21 +0000 Subject: add unit tests llvm-svn: 110278 --- .../BlocksRuntime/tests/returnfunctionptr.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 compiler-rt/BlocksRuntime/tests/returnfunctionptr.c (limited to 'compiler-rt/BlocksRuntime/tests/returnfunctionptr.c') diff --git a/compiler-rt/BlocksRuntime/tests/returnfunctionptr.c b/compiler-rt/BlocksRuntime/tests/returnfunctionptr.c new file mode 100644 index 00000000000..6c7df631f8d --- /dev/null +++ b/compiler-rt/BlocksRuntime/tests/returnfunctionptr.c @@ -0,0 +1,23 @@ +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. + + +// CONFIG rdar://6339747 but wasn't + +#include + +int (*funcptr)(long); + +int (*(^b)(char))(long); + +int main(int argc, char *argv[]) { + // implicit is fine + b = ^(char x) { return funcptr; }; + // explicit never parses + b = ^int (*(char x))(long) { return funcptr; }; + printf("%s: Success\n", argv[0]); + return 0; +} -- cgit v1.2.3