// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s -std=c++14 | FileCheck %s

template<typename> struct custom_copy_ctor {
  custom_copy_ctor() = default;
  custom_copy_ctor(custom_copy_ctor const &) {}
};

// CHECK: define {{.*}} @_ZN16custom_copy_ctorIvEC2ERKS0_(
void pr22354() {
  custom_copy_ctor<void> cc;
  [cc](auto){}(1);
}


Add a test that we emit copy-ctors for captures in generic lambdas.
PR22354: Add a test that we emit copy-ctors for captures in generic lambdas.

The bug was fixed by r235921.


git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@236254 91177308-0d34-0410-b5e6-96231b3b80d8
