File tree Expand file tree Collapse file tree
src/semmle/python/objects
test/library-tests/PointsTo/calls Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -363,11 +363,7 @@ class CallableValue extends Value {
363363 or
364364 exists ( string name |
365365 call .getArgByName ( name ) = result and
366- (
367- this .( PythonFunctionObjectInternal ) .getScope ( ) .getArg ( n ) .getName ( ) = name
368- or
369- this .( BoundMethodObjectInternal ) .getFunction ( ) .getScope ( ) .getArg ( n + 1 ) .getName ( ) = name
370- )
366+ this .getParameter ( n ) .getId ( ) = name
371367 )
372368 or
373369 called instanceof BoundMethodObjectInternal and
@@ -386,19 +382,11 @@ class CallableValue extends Value {
386382 |
387383 exists ( int n |
388384 call .getArg ( n ) = result and
389- exists ( PythonFunctionObjectInternal py |
390- py = this or py = this .( BoundMethodObjectInternal ) .getFunction ( )
391- |
392- py .getScope ( ) .getArg ( n + offset ) .getName ( ) = name
393- )
385+ this .getParameter ( n + offset ) .getId ( ) = name
394386 )
395387 or
396388 call .getArgByName ( name ) = result and
397- exists ( PythonFunctionObjectInternal py |
398- py = this or py = this .( BoundMethodObjectInternal ) .getFunction ( )
399- |
400- exists ( py .getScope ( ) .getArgByName ( name ) )
401- )
389+ exists ( this .getParameterByName ( name ) )
402390 or
403391 called instanceof BoundMethodObjectInternal and
404392 offset = 1 and
Original file line number Diff line number Diff line change 77| 23 | ControlFlowNode for Attribute() | Function f | arg1 | ControlFlowNode for w |
88| 23 | ControlFlowNode for Attribute() | Function f | arg2 | ControlFlowNode for z |
99| 23 | ControlFlowNode for Attribute() | Function f | self | ControlFlowNode for c |
10- | 23 | ControlFlowNode for Attribute() | Method(Function f, C()) | arg0 | ControlFlowNode for w |
11- | 23 | ControlFlowNode for Attribute() | Method(Function f, C()) | arg1 | ControlFlowNode for z |
10+ | 23 | ControlFlowNode for Attribute() | Method(Function f, C()) | arg1 | ControlFlowNode for w |
11+ | 23 | ControlFlowNode for Attribute() | Method(Function f, C()) | arg2 | ControlFlowNode for z |
1212| 24 | ControlFlowNode for Attribute() | Function C.n | arg1 | ControlFlowNode for x |
1313| 24 | ControlFlowNode for Attribute() | Function C.n | self | ControlFlowNode for c |
14- | 24 | ControlFlowNode for Attribute() | Method(Function C.n, C()) | self | ControlFlowNode for x |
14+ | 24 | ControlFlowNode for Attribute() | Method(Function C.n, C()) | arg1 | ControlFlowNode for x |
1515| 25 | ControlFlowNode for Attribute() | Function C.n | arg1 | ControlFlowNode for z |
1616| 25 | ControlFlowNode for Attribute() | Function C.n | self | ControlFlowNode for y |
1717| 33 | ControlFlowNode for Attribute() | Function D.foo | arg | ControlFlowNode for IntegerLiteral |
You can’t perform that action at this time.
0 commit comments