diff options
| author | Steve Naroff <snaroff@apple.com> | 2008-10-15 18:38:58 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2008-10-15 18:38:58 +0000 |
| commit | e17f52fc2365d8b3fa739922e1d8c894f19aee86 (patch) | |
| tree | fbb273db91b83fa7dde02e65818fea9383497863 /clang/test/Rewriter/block-test.c | |
| parent | f998a659801bc3ff40ac214fa0ff77f61aa7f42c (diff) | |
| download | bcm5719-llvm-e17f52fc2365d8b3fa739922e1d8c894f19aee86.tar.gz bcm5719-llvm-e17f52fc2365d8b3fa739922e1d8c894f19aee86.zip | |
Tighten up blocks rewriter to handle casts and some other interesting cases.
This fixes <rdar://problem/6289007> clang block rewriter: ^ in cast is not rewritten.
llvm-svn: 57591
Diffstat (limited to 'clang/test/Rewriter/block-test.c')
| -rw-r--r-- | clang/test/Rewriter/block-test.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Rewriter/block-test.c b/clang/test/Rewriter/block-test.c index 0a6bde0886a..82b63a09f9d 100644 --- a/clang/test/Rewriter/block-test.c +++ b/clang/test/Rewriter/block-test.c @@ -1,5 +1,16 @@ // RUN: clang -rewrite-blocks %s -o - +static int (^block)(const void *, const void *) = (int (^)(const void *, const void *))0; +static int (*func)(int (^block)(void *, void *)) = (int (*)(int (^block)(void *, void *)))0; + +typedef int (^block_T)(const void *, const void *); +typedef int (*func_T)(int (^block)(void *, void *)); + +void foo(const void *a, const void *b, void *c) { + int (^block)(const void *, const void *) = (int (^)(const void *, const void *))c; + int (*func)(int (^block)(void *, void *)) = (int (*)(int (^block)(void *, void *)))c; +} + typedef void (^test_block_t)(); int main(int argc, char **argv) { |

