1// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-10.7 -emit-llvm -o - %s | FileCheck %s 2 3// Properly instantiate a non-dependent message expression which 4// requires a contextual conversion to ObjC pointer type. 5@interface Test0 6- (void) foo; 7@end 8namespace test0 { 9 struct A { 10 operator Test0*(); 11 }; 12 template <class T> void foo() { 13 A a; 14 [a foo]; 15 } 16 template void foo<int>(); 17 // CHECK-LABEL: define weak_odr void @_ZN5test03fooIiEEvv() 18 // CHECK: [[T0:%.*]] = call noundef ptr @_ZN5test01AcvP5Test0Ev( 19 // CHECK-NEXT: [[T1:%.*]] = load ptr, ptr 20 // CHECK-NEXT: call void @objc_msgSend(ptr noundef [[T0]], ptr noundef [[T1]]) 21 // CHECK-NEXT: ret void 22} 23