1// RUN: %clang_cc1 -std=c++11 %s -Wunused -verify
2// expected-no-diagnostics
3
4template<typename T>
5void destroy(T* ptr) {
6  ptr->~T();
7  (*ptr).~T();
8}
9
10void destructor() {
11  auto lambda = []{};
12  destroy(&lambda);
13}
14