mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
19 lines
529 B
Plaintext
19 lines
529 B
Plaintext
import cpp
|
|
|
|
string describe(File f) {
|
|
f.compiledAsC() and
|
|
result = "C"
|
|
or
|
|
f.compiledAsCpp() and
|
|
result = "C++"
|
|
or
|
|
f instanceof XMLParent and
|
|
result = "XMLParent" // regression tests a bug in the characteristic predicate of XMLParent
|
|
}
|
|
|
|
from File f
|
|
where f.toString() != ""
|
|
select f.toString(), f.getRelativePath(), concat(f.getAQlClass().toString(), ", "),
|
|
concat(describe(f), ", "), concat(f.getATopLevelDeclaration().toString(), ", "),
|
|
concat(LocalVariable v | f.getADeclaration() = v | v.toString(), ", ")
|