Files
codeql/cpp/ql/test/library-tests/templates/segfault2/test.cpp
2018-08-02 17:53:23 +01:00

18 lines
201 B
C++

typedef void (*ft)(void *);
int f(ft fp);
class C {};
template <typename T>
struct S {
static void m(void *t) {
static_cast<T*>(t)->~T();
}
};
void g() {
int i = f(S<C>::m);
}