blob: 208d111358471334f6a74ce773afb04a7195203d [file] [log] [blame]
Stephen Hines176edba2014-12-01 14:53:08 -08001// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++11 -o - %s | FileCheck %s
2
3// Make sure that we emit H's constructor twice: once with the first lambda
4// inside of 'lep' and again with the second lambda inside of 'lep'.
5// CHECK-DAG: @"\01??0?$H@V<lambda_1>@??$lep@X@@YAXXZ@@@QAE@XZ"
6// CHECK-DAG: @"\01??0?$H@V<lambda_2>@??$lep@X@@YAXXZ@@@QAE@XZ"
7
8template <typename>
9struct H {
10 H() {}
11};
12
13template <typename Fx>
14int K_void(const Fx &) {
15 H<Fx> callee;
16 return 0;
17}
18template <typename Fx>
19int K_int(const Fx &) {
20 H<Fx> callee;
21 return 0;
22}
23
24struct pair {
25 pair(int, int);
26};
27
28struct E1;
29
30template <typename>
31void lep() {
32 pair x(K_void([] {}), K_int([] {}));
33}
34
35auto z = lep<void>;