1215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor// RUN: %clang_cc1 -std=c++11 %s -Wunused -verify 2215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor 3215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregortemplate<typename T> 4215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregorvoid destroy(T* ptr) { 5215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor ptr->~T(); 6215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor (*ptr).~T(); 7215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor} 8215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor 9215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregorvoid destructor() { 10215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor auto lambda = []{}; 11215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor destroy(&lambda); 12215e4e17d00e12c38687a95502506d8f2ca3e646Douglas Gregor} 13