[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / friend3.cpp
blob3368fdb076153627804cf060a7ebc0c5399c6557
1 // RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -emit-llvm %s -o - | FileCheck %s
3 namespace pr8852 {
4 void foo();
5 struct S {
6 friend void foo() {}
7 };
9 void main() {
10 foo();
12 // CHECK: define {{.*}} @_ZN6pr88523fooEv
15 namespace pr9518 {
16 template<typename T>
17 struct provide {
18 friend T f() { return T(); }
21 void g() {
22 void f();
23 provide<void> p;
24 f();
26 // CHECK: define {{.*}} @_ZN6pr95181fEv