| 1 | // RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - -fblocks |
|---|---|
| 2 | // RUN: %clang_cc1 %s -triple %ms_abi_triple -fno-rtti -emit-llvm -o - -fblocks |
| 3 | // Just test that this doesn't crash the compiler... |
| 4 | |
| 5 | void func(void*); |
| 6 | |
| 7 | struct Test |
| 8 | { |
| 9 | virtual void use() { func((void*)this); } |
| 10 | Test(Test&c) { func((void*)this); } |
| 11 | Test() { func((void*)this); } |
| 12 | }; |
| 13 | |
| 14 | void useBlock(void (^)(void)); |
| 15 | |
| 16 | int main (void) { |
| 17 | __block Test t; |
| 18 | useBlock(^(void) { t.use(); }); |
| 19 | } |
| 20 | |
| 21 |