blob: 0d455c6ca81cf1cf0d5c466a09f08193bc904f75 [file] [log] [blame]
Fariborz Jahanian0339d722010-09-10 18:56:35 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-nonfragile-abi -fexceptions -o - %s | FileCheck %s
2// rdar://8409336
3
4struct TFENode {
5void GetURL() const;
6};
7
8@interface TNodeIconAndNameCell
9- (const TFENode&) node;
10@end
11
12@implementation TNodeIconAndNameCell
13- (const TFENode&) node {
14// CHECK: call %struct.TFENode* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
15// CHECK-NEXT: call void @_ZNK7TFENode6GetURLEv(%struct.TFENode* %{{.*}})
16 self.node.GetURL();
17} // expected-warning {{control reaches end of non-void function}}
18@end
Fariborz Jahaniandc5ea092010-09-18 20:47:25 +000019
20// rdar://8437240
21struct X {
22 int x;
23};
24
25void f0(const X &parent);
26@interface A
27- (const X&) target;
28@end
29void f1(A *a) {
30// CHECK: [[PRP:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
31// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* [[PRP]])
32 f0(a.target);
33
34// CHECK: [[MSG:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
35// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* [[MSG]])
36 f0([a target]);
37}
38