Mercurial > hg > CbC > CbC_llvm
comparison clang/test/Rewriter/rewrite-message-expr.mm @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
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 | |
3 // radar 7617047 | |
4 | |
5 @interface Baz | |
6 - (id)y; | |
7 + (id)z; | |
8 @end | |
9 | |
10 @interface Foo { | |
11 @public | |
12 int bar; | |
13 } | |
14 @end | |
15 | |
16 extern Foo* x(id a); | |
17 | |
18 int f(Baz *baz) { | |
19 int i = x([Baz z])->bar; | |
20 int j = ((Foo*)[Baz z])->bar; | |
21 int k = x([baz y])->bar; | |
22 return i+j+k; | |
23 } | |
24 | |
25 // CHECK-LP: ((struct Foo_IMPL *)x(((id (*)(id, SEL))(void *)objc_msgSend)(objc_getClass("Baz"), sel_registerName("z"))))->bar |