mirror of
https://github.com/github/codeql.git
synced 2025-12-19 02:13:17 +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
30 lines
929 B
Plaintext
30 lines
929 B
Plaintext
import cpp
|
|
|
|
string functionName(Function f) {
|
|
result = f.getQualifiedName() + "(" + f.getParameterString() + ")"
|
|
or
|
|
not exists(f.getQualifiedName()) and
|
|
result = f.getName() + "(" + f.getParameterString() + ")"
|
|
}
|
|
|
|
from MemberFunction f, string description
|
|
where
|
|
description = "1 constructor" and
|
|
f instanceof Constructor and
|
|
not f instanceof CopyConstructor and
|
|
not f instanceof MoveConstructor
|
|
or
|
|
description = "2 copy constructor" and f instanceof CopyConstructor
|
|
or
|
|
description = "3 move constructor" and f instanceof MoveConstructor
|
|
or
|
|
description = "4 copy assignment" and f instanceof CopyAssignmentOperator
|
|
or
|
|
description = "5 move assignment" and f instanceof MoveAssignmentOperator
|
|
or
|
|
description = "6 none of the above" and
|
|
not f instanceof Constructor and
|
|
not f instanceof CopyAssignmentOperator and
|
|
not f instanceof MoveAssignmentOperator
|
|
select description, functionName(f)
|