mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
12 lines
363 B
Plaintext
12 lines
363 B
Plaintext
import cpp
|
|
import semmle.code.cpp.ir.ValueNumbering
|
|
import semmle.code.cpp.ir.IR
|
|
|
|
// Every non-void instruction should have exactly one GVN.
|
|
// So this query should have zero results.
|
|
from Instruction i
|
|
where
|
|
not i.getResultIRType() instanceof IRVoidType and
|
|
count(valueNumber(i)) != 1
|
|
select i, concat(ValueNumber g | g = valueNumber(i) | g.getKind(), ", ")
|