Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Rewriter / objc-modern-implicit-cast.mm
blob4b852518f912029eef7c667badc73d98f4a16029
1 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2 // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
4 typedef void(^BL)(void);
6 id return_id(void(^block)(void)) {
7   return block;
10 BL return_block(id obj) {
11   return obj;
14 int main()
16     void(^block)(void);
17     id obj;
18     block = obj; // AnyPointerToBlockPointerCast
19     obj = block; // BlockPointerToObjCPointerCast
21    id obj1 = block;
23    void(^block1)(void) = obj1;
25    return_id(block1);
27    return_id(obj1);
29    return_block(block1);
31    return_block(obj1);