diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-07-15 17:07:12 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-07-15 17:07:12 +0000 |
commit | f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8 (patch) | |
tree | 5e946d69177464379cb1a38ac18206180d763639 /test/CodeGenCXX/instantiate-blocks.cpp | |
parent | 1928da94b55683957759d5c5ff4593a118773394 (diff) | |
download | FreeBSD-src-f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8.zip FreeBSD-src-f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8.tar.gz |
Update clang to r108428.
Diffstat (limited to 'test/CodeGenCXX/instantiate-blocks.cpp')
-rw-r--r-- | test/CodeGenCXX/instantiate-blocks.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
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 <typename T> T foo(T t) +{ + void (^testing)(int) = ^(int bar) { printf("bar is %d\n", bar); }; + printf("bar is\n"); + return 1; +} + +template <typename T> void gorf(T t) +{ + foo(t); +} + + +void test(void) +{ + gorf(2); +} +} + + |