mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
12 lines
223 B
C++
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);
|
|
}
|