File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
python/ql/lib/semmle/python/essa Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -501,8 +501,7 @@ class AssignmentDefinition extends EssaNodeDefinition {
501
501
ControlFlowNode value ;
502
502
503
503
AssignmentDefinition ( ) {
504
- SsaSource:: assignment_definition ( this .getSourceVariable ( ) , this .getDefiningNode ( ) , value ) and
505
- not this instanceof ParameterDefinition
504
+ SsaSource:: assignment_definition ( this .getSourceVariable ( ) , this .getDefiningNode ( ) , value )
506
505
}
507
506
508
507
ControlFlowNode getValue ( ) { result = value }
Original file line number Diff line number Diff line change @@ -20,7 +20,12 @@ module SsaSource {
20
20
/** Holds if `v` is defined by assignment at `defn` and given `value`. */
21
21
cached
22
22
predicate assignment_definition ( Variable v , ControlFlowNode defn , ControlFlowNode value ) {
23
- defn .( NameNode ) .defines ( v ) and defn .( DefinitionNode ) .getValue ( ) = value
23
+ defn .( NameNode ) .defines ( v ) and
24
+ defn .( DefinitionNode ) .getValue ( ) = value and
25
+ // since parameter will be considered a DefinitionNode, if it has a default value,
26
+ // we need to exclude it here since it is already covered by parameter_definition
27
+ // (and points-to was unhappy that it was included in both)
28
+ not parameter_definition ( v , defn )
24
29
}
25
30
26
31
/** Holds if `v` is defined by assignment of the captured exception. */
You can’t perform that action at this time.
0 commit comments