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 {
501501 ControlFlowNode value ;
502502
503503 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 )
506505 }
507506
508507 ControlFlowNode getValue ( ) { result = value }
Original file line number Diff line number Diff line change @@ -20,7 +20,12 @@ module SsaSource {
2020 /** Holds if `v` is defined by assignment at `defn` and given `value`. */
2121 cached
2222 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 )
2429 }
2530
2631 /** Holds if `v` is defined by assignment of the captured exception. */
You can’t perform that action at this time.
0 commit comments