Files
codeql/cpp/ql/test/library-tests/functions/functions/Functions1.ql
2020-05-14 13:05:39 +01:00

22 lines
428 B
Plaintext

/**
* @name Functions1
*/
import cpp
string describe(Function f) {
f.isTopLevel() and
result = "isTopLevel"
or
f instanceof TopLevelFunction and
result = "TopLevelFunction"
or
result = "declaration:" + f.getADeclarationLocation()
or
result = "definition:" + f.getDefinitionLocation()
}
from Function f
where exists(f.getLocation())
select f, f.getName(), f.getParameterString(), concat(describe(f), ", ")