Files
codeql/cpp/ql/test/examples/expressions/VacuousDestructorCall.cpp
2018-08-02 17:53:23 +01:00

12 lines
191 B
C++

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