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

20 lines
289 B
C++

template<typename T>
int f(T a) {
return 5;
}
template<typename T>
void g(T t) {
long l = 1;
// This is a call to f(long), but as g is never called, we
// never instantiate it. So f(long) has a definition, but not
// a body.
f(l);
}
void h(int x) {
f(x);
}