blob: 93e22dcd6b8a50aff041b05b334d55555ba78b70 [file] [log] [blame]
Hans Wennborg442e4f72013-12-13 22:43:52 +00001// RUN: %clang_cc1 %s -cxx-abi itanium -emit-llvm -o - -fblocks
2// RUN: %clang_cc1 %s -cxx-abi microsoft -fno-rtti -emit-llvm -o - -fblocks
David Chisnall5221a942012-04-04 13:07:13 +00003// Just test that this doesn't crash the compiler...
4
5void func(void*);
6
7struct Test
8{
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