1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s 2*f4a2713aSLionel Sambuc // PR8864 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc struct Foo { TryFoo(Foo * f2)5*f4a2713aSLionel Sambuc friend bool TryFoo(Foo *f2) { return TryFoo(0, f2); } 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc // CHECK: define{{.*}}Z6TryFooP3Foo 8*f4a2713aSLionel Sambuc // CHECK-NOT: ret 9*f4a2713aSLionel Sambuc // CHECK: call{{.*}}Z6TryFooiP3Foo 10*f4a2713aSLionel Sambuc // CHECK: ret 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc friend bool TryFoo(int, Foo *f3); 13*f4a2713aSLionel Sambuc }; 14*f4a2713aSLionel Sambuc bool TryFoo(Foo *f5); main(void)15*f4a2713aSLionel Sambucint main(void) { 16*f4a2713aSLionel Sambuc Foo f; 17*f4a2713aSLionel Sambuc TryFoo(&f); 18*f4a2713aSLionel Sambuc } 19