[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / block.cpp
blobaa356688dd630f7dcdcebdf4d22aae9bd045e9d9
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...
5 void func(void*);
7 struct Test
9 virtual void use() { func((void*)this); }
10 Test(Test&c) { func((void*)this); }
11 Test() { func((void*)this); }
14 void useBlock(void (^)(void));
16 int main (void) {
17 __block Test t;
18 useBlock(^(void) { t.use(); });