mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
13 lines
376 B
Plaintext
13 lines
376 B
Plaintext
import cpp
|
|
|
|
string functionType(Function f, int i) {
|
|
if exists(f.getParameter(i))
|
|
then result = f.getParameter(i).getType().toString() + " -> " + functionType(f, i + 1)
|
|
else (i = f.getNumberOfParameters() and result = f.getType().toString())
|
|
}
|
|
|
|
from Function f, boolean b
|
|
where if f.isSideEffectFree() then b = true else b = false
|
|
select f, functionType(f, 0), b
|
|
|