mirror of
https://github.com/github/codeql.git
synced 2026-03-28 18:28: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
20 lines
515 B
Plaintext
20 lines
515 B
Plaintext
/**
|
|
* @name SSA unique definition test
|
|
* @description SSA unique definition test. For each use there must be zero or one SSA definitions.
|
|
* @kind test
|
|
*/
|
|
|
|
import cpp
|
|
import semmle.code.cpp.rangeanalysis.RangeSSA
|
|
|
|
/*
|
|
* Count of number of uses where the number of SSA definitions exceeds one.
|
|
* Should always be zero *regardless* of the input
|
|
*/
|
|
|
|
select count(RangeSsaDefinition d1, RangeSsaDefinition d2, Expr u, LocalScopeVariable v |
|
|
d1.getAUse(v) = u and
|
|
d2.getAUse(v) = u and
|
|
not d1 = d2
|
|
)
|