Files
codeql/cpp/ql/test/library-tests/syntax-zoo/VacuousDestructorCall.cpp
2019-08-06 14:10:25 +02:00

12 lines
223 B
C++

template<class T>
void CallDestructor(T x, T *y) {
x.T::~T();
y->T::~T();
}
void Vacuous(int i) {
// An int doesn't have a destructor, but we get to call it anyway through a
// template.
CallDestructor(i, &i);
}