mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Python points-to: Rationalize handling of expressions and conditions. Tweak API to be a bit more backward-compatible.
This commit is contained in:
@@ -5,10 +5,9 @@ import semmle.python.pointsto.PointsToContext
|
||||
import Util
|
||||
|
||||
|
||||
from ControlFlowNode test, ControlFlowNode use, Object val, boolean eval, ClassObject cls, PointsToContext ctx
|
||||
from ControlFlowNode test, ControlFlowNode use, Value val, boolean eval, PointsToContext ctx
|
||||
where
|
||||
not use instanceof NameConstantNode and
|
||||
not use.getNode() instanceof ImmutableLiteral and
|
||||
PointsTo::points_to(use, ctx, val, cls, _) and
|
||||
eval = PointsTo::test_evaluates_boolean(test, use, ctx, val, cls, _)
|
||||
select locate(test.getLocation(), "bc"), test.getNode().toString(), eval.toString(), use.getNode().toString(), val.toString()
|
||||
eval = Conditionals::testEvaluates(test, use, ctx, val, _)
|
||||
select locate(test.getLocation(), "bc"), test.getNode().toString(), eval.toString(), use.getNode().toString(), val.getSource().toString()
|
||||
|
||||
Reference in New Issue
Block a user