1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm --std=c++17 %s -o - | FileCheck %s
4 friend const stream
&operator<<(const stream
&, const float &);
8 constexpr float f_zero
= 0.0f
;
9 constexpr float f_one
= 1.0f
;
10 constexpr float f_two
= 2.0f
;
14 s
<< f_zero
<< f_one
<< f_two
;
18 // CHECK: define{{.*}} void @_Z3foov
19 // CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 0
20 // CHECK-NEXT: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 1
21 // CHECK-NEXT: store float 0.000
22 // CHECK-NEXT: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 2
23 // CHECK-NEXT: store float 1.000
24 // CHECK-NEXT: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 3
25 // CHECK-NEXT: store float 2.000
27 // The lambda body. Reverse iteration when the captures aren't deterministic
28 // causes these to be laid out differently in the lambda.
29 // CHECK: define internal void
30 // CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 0
31 // CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 1
32 // CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 2
33 // CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 3