mirror of
https://github.com/github/codeql.git
synced 2026-01-24 03:42:59 +01:00
Some files that will change in #1736 have been spared. ./build -j4 target/jars/qlformat find ql/cpp/ql -name "*.ql" -print0 | xargs -0 target/jars/qlformat --input find ql/cpp/ql -name "*.qll" -print0 | xargs -0 target/jars/qlformat --input (cd ql && git checkout 'cpp/ql/src/semmle/code/cpp/ir/implementation/**/*SSA*.qll') buildutils-internal/scripts/pr-checks/sync-identical-files.py --latest
37 lines
997 B
Plaintext
37 lines
997 B
Plaintext
import cpp
|
|
|
|
string functionName(Function f) {
|
|
exists(string name, string templateArgs, string args |
|
|
result = name + templateArgs + args and
|
|
name = f.getQualifiedName() and
|
|
(
|
|
if exists(f.getATemplateArgument())
|
|
then
|
|
templateArgs = "<" +
|
|
concat(int i |
|
|
exists(f.getTemplateArgument(i))
|
|
|
|
|
f.getTemplateArgument(i).toString(), "," order by i
|
|
) + ">"
|
|
else templateArgs = ""
|
|
) and
|
|
args = "(" +
|
|
concat(int i |
|
|
exists(f.getParameter(i))
|
|
|
|
|
f.getParameter(i).getType().toString(), "," order by i
|
|
) + ")"
|
|
)
|
|
}
|
|
|
|
from string resource, int ntotal, int ncode, int ncomment
|
|
where
|
|
exists(File f |
|
|
f.getShortName() = resource and numlines(unresolveElement(f), ntotal, ncode, ncomment)
|
|
)
|
|
or
|
|
exists(Function f |
|
|
functionName(f) = resource and numlines(unresolveElement(f), ntotal, ncode, ncomment)
|
|
)
|
|
select resource, ntotal, ncode, ncomment
|