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 {
340
340
p .( KeywordParameter ) .getDefaultValue ( ) = e .getExprNode ( ) .getExpr ( )
341
341
}
342
342
343
+ cached
344
+ Location getLocation ( NodeImpl n ) { result = n .getLocationImpl ( ) }
345
+
346
+ cached
347
+ string toString ( NodeImpl n ) { result = n .toStringImpl ( ) }
348
+
343
349
/**
344
350
* This is the local flow predicate that is used as a building block in global
345
351
* data flow.
Original file line number Diff line number Diff line change @@ -19,12 +19,10 @@ class Node extends TNode {
19
19
Parameter asParameter ( ) { result = this .( ParameterNode ) .getParameter ( ) }
20
20
21
21
/** Gets a textual representation of this node. */
22
- cached
23
- final string toString ( ) { result = this .( NodeImpl ) .toStringImpl ( ) }
22
+ final string toString ( ) { result = toString ( this ) }
24
23
25
24
/** Gets the location of this node. */
26
- cached
27
- final Location getLocation ( ) { result = this .( NodeImpl ) .getLocationImpl ( ) }
25
+ final Location getLocation ( ) { result = getLocation ( this ) }
28
26
29
27
/**
30
28
* Holds if this element is at the specified location.
You can’t perform that action at this time.
0 commit comments