File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
ruby/ql/lib/codeql/ruby/dataflow/internal Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,12 @@ private module Cached {
340340 p .( KeywordParameter ) .getDefaultValue ( ) = e .getExprNode ( ) .getExpr ( )
341341 }
342342
343+ cached
344+ Location getLocation ( NodeImpl n ) { result = n .getLocationImpl ( ) }
345+
346+ cached
347+ string toString ( NodeImpl n ) { result = n .toStringImpl ( ) }
348+
343349 /**
344350 * This is the local flow predicate that is used as a building block in global
345351 * data flow.
Original file line number Diff line number Diff line change @@ -19,12 +19,10 @@ class Node extends TNode {
1919 Parameter asParameter ( ) { result = this .( ParameterNode ) .getParameter ( ) }
2020
2121 /** Gets a textual representation of this node. */
22- cached
23- final string toString ( ) { result = this .( NodeImpl ) .toStringImpl ( ) }
22+ final string toString ( ) { result = toString ( this ) }
2423
2524 /** Gets the location of this node. */
26- cached
27- final Location getLocation ( ) { result = this .( NodeImpl ) .getLocationImpl ( ) }
25+ final Location getLocation ( ) { result = getLocation ( this ) }
2826
2927 /**
3028 * Holds if this element is at the specified location.
You can’t perform that action at this time.
0 commit comments