summaryrefslogtreecommitdiff
path: root/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp
blob: 4487cfc4ba282aa1aa7ba431ce13916a612350c8 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -std=c++11 %s -Wunused -verify

template<typename T>
void destroy(T* ptr) {
  ptr->~T();
  (*ptr).~T();
}

void destructor() {
  auto lambda = []{};
  destroy(&lambda);
}