Files
codeql/python/ql/test/library-tests/PointsTo/new/TestEvaluate.ql
2025-11-26 12:30:31 +00:00

19 lines
621 B
Plaintext

import python
private import LegacyPointsTo
import Util
from
ControlFlowNode test, ControlFlowNode use, ObjectInternal val, boolean eval, PointsToContext ctx,
ControlFlowNode origin, string what
where
not use instanceof NameConstantNode and
not use.getNode() instanceof ImmutableLiteral and
eval = Conditionals::testEvaluates(test, use, ctx, val, origin) and
(
what = val.getSource().(Object).toString()
or
not exists(val.getSource()) and what = origin.getNode().toString()
)
select locate(test.getLocation(), "bc"), test.getNode().toString(), eval.toString(),
use.getNode().toString(), what