From f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8 Mon Sep 17 00:00:00 2001 From: rdivacky Date: Thu, 15 Jul 2010 17:07:12 +0000 Subject: Update clang to r108428. --- test/CodeGenCXX/instantiate-blocks.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test/CodeGenCXX/instantiate-blocks.cpp') diff --git a/test/CodeGenCXX/instantiate-blocks.cpp b/test/CodeGenCXX/instantiate-blocks.cpp index c8f897d..e206582 100644 --- a/test/CodeGenCXX/instantiate-blocks.cpp +++ b/test/CodeGenCXX/instantiate-blocks.cpp @@ -31,3 +31,29 @@ void test2(void) { foo(100, 'a'); } + +namespace rdar6182276 { +extern "C" { +int printf(const char *, ...); +} + +template T foo(T t) +{ + void (^testing)(int) = ^(int bar) { printf("bar is %d\n", bar); }; + printf("bar is\n"); + return 1; +} + +template void gorf(T t) +{ + foo(t); +} + + +void test(void) +{ + gorf(2); +} +} + + -- cgit v1.1