Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Rewriter / rewrite-message-expr.mm
blob10398cb25d0be6e9e38d392a663f87a6e7edc05b
1 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
2 // RUN: FileCheck -check-prefix CHECK-LP --input-file=%t-rw.cpp %s
4 @interface Baz
5 - (id)y;
6 + (id)z;
7 @end
9 @interface Foo {
10 @public
11         int bar;
13 @end
15 extern Foo* x(id a);
17 int f(Baz *baz) {
18         int i = x([Baz z])->bar;
19         int j = ((Foo*)[Baz z])->bar;
20         int k = x([baz y])->bar;
21         return i+j+k;
24 // CHECK-LP: ((struct Foo_IMPL *)x(((id (*)(id, SEL))(void *)objc_msgSend)(objc_getClass("Baz"), sel_registerName("z"))))->bar