File tree Expand file tree Collapse file tree 2 files changed +6
-18
lines changed
src/semmle/python/objects
test/library-tests/PointsTo/calls Expand file tree Collapse file tree 2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -363,11 +363,7 @@ class CallableValue extends Value {
363
363
or
364
364
exists ( string name |
365
365
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
371
367
)
372
368
or
373
369
called instanceof BoundMethodObjectInternal and
@@ -386,19 +382,11 @@ class CallableValue extends Value {
386
382
|
387
383
exists ( int n |
388
384
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
394
386
)
395
387
or
396
388
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 ) )
402
390
or
403
391
called instanceof BoundMethodObjectInternal and
404
392
offset = 1 and
Original file line number Diff line number Diff line change 7
7
| 23 | ControlFlowNode for Attribute() | Function f | arg1 | ControlFlowNode for w |
8
8
| 23 | ControlFlowNode for Attribute() | Function f | arg2 | ControlFlowNode for z |
9
9
| 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 |
12
12
| 24 | ControlFlowNode for Attribute() | Function C.n | arg1 | ControlFlowNode for x |
13
13
| 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 |
15
15
| 25 | ControlFlowNode for Attribute() | Function C.n | arg1 | ControlFlowNode for z |
16
16
| 25 | ControlFlowNode for Attribute() | Function C.n | self | ControlFlowNode for y |
17
17
| 33 | ControlFlowNode for Attribute() | Function D.foo | arg | ControlFlowNode for IntegerLiteral |
You can’t perform that action at this time.
0 commit comments