brintos

brintos / llvm-project-archived public Read only

0
0
Text · 708 B · 79fdd74 Raw
36 lines · cpp
1// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++11 -o - %s | FileCheck %s2 3// Make sure that we emit H's constructor twice: once with the first lambda4// inside of 'lep' and again with the second lambda inside of 'lep'.5// CHECK-DAG: @"??0?$H@V<lambda_1>@?0???$lep@X@@YAXXZ@@@QAE@XZ"6// CHECK-DAG: @"??0?$H@V<lambda_2>@?0???$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>;36