Skip to content

Commit f4b5f39

Browse files
authored
Merge pull request github#13044 from cklin/javascript-locatable-tostring-join-ordering
JS: Add pragma[only_bind_out] to Locatable::toString() calls
2 parents 720586c + 0984fc7 commit f4b5f39

File tree

1 file changed

+6
-2
lines changed
  • javascript/ql/lib/semmle/javascript

1 file changed

+6
-2
lines changed

javascript/ql/lib/semmle/javascript/CFG.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ class SyntheticControlFlowNode extends @synthetic_cfg_node, ControlFlowNode {
364364
class ControlFlowEntryNode extends SyntheticControlFlowNode, @entry_node {
365365
override predicate isUnreachable() { none() }
366366

367-
override string toString() { result = "entry node of " + this.getContainer().toString() }
367+
override string toString() {
368+
result = "entry node of " + pragma[only_bind_out](this.getContainer()).toString()
369+
}
368370
}
369371

370372
/** A synthetic CFG node marking the exit of a function or toplevel script. */
@@ -373,7 +375,9 @@ class ControlFlowExitNode extends SyntheticControlFlowNode, @exit_node {
373375
exit_cfg_node(this, container)
374376
}
375377

376-
override string toString() { result = "exit node of " + this.getContainer().toString() }
378+
override string toString() {
379+
result = "exit node of " + pragma[only_bind_out](this.getContainer()).toString()
380+
}
377381
}
378382

379383
/**

0 commit comments

Comments
 (0)