brintos

brintos / llvm-project-archived public Read only

0
0
Text · 467 B · aa35668 Raw
21 lines · cpp
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 5void func(void*);6 7struct Test8{9  virtual void use() { func((void*)this); }10  Test(Test&c) { func((void*)this); }11  Test() { func((void*)this); }12};13 14void useBlock(void (^)(void));15 16int main (void) {17  __block Test t;18  useBlock(^(void) { t.use(); });19}20 21