Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / pr20719.cpp
blob79fdd7416024f93ea22b11d22ed2dbb9e227b04a
1 // RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++11 -o - %s | FileCheck %s
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: @"??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"
8 template <typename>
9 struct H {
10 H() {}
13 template <typename Fx>
14 int K_void(const Fx &) {
15 H<Fx> callee;
16 return 0;
18 template <typename Fx>
19 int K_int(const Fx &) {
20 H<Fx> callee;
21 return 0;
24 struct pair {
25 pair(int, int);
28 struct E1;
30 template <typename>
31 void lep() {
32 pair x(K_void([] {}), K_int([] {}));
35 auto z = lep<void>;