mirror of
https://github.com/github/codeql.git
synced 2026-01-27 21:33:03 +01:00
19 lines
291 B
Plaintext
19 lines
291 B
Plaintext
import cpp
|
|
|
|
string describe(Declaration d)
|
|
{
|
|
(
|
|
d instanceof Variable and
|
|
result = "Variable"
|
|
) or (
|
|
d instanceof Function and
|
|
result = "Function"
|
|
)
|
|
}
|
|
|
|
from DeclStmt ds, Declaration d
|
|
where
|
|
ds.getADeclaration() = d
|
|
select
|
|
ds, concat(d.getName(), ", "), concat(describe(d), ", ")
|