Skip to content

Commit 6661132

Browse files
committed
C++: No need to keep this in its own module now.
1 parent d804fc5 commit 6661132

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -222,28 +222,25 @@ private module Cached {
222222

223223
import Cached
224224

225-
private int getNumberOfIndirections(Node n) {
226-
result = n.(RawIndirectOperand).getIndirectionIndex()
227-
or
228-
result = n.(RawIndirectInstruction).getIndirectionIndex()
229-
or
230-
result = n.(VariableNode).getIndirectionIndex()
231-
or
232-
result = n.(PostUpdateNodeImpl).getIndirectionIndex()
233-
or
234-
result = n.(FinalParameterNode).getIndirectionIndex()
235-
or
236-
result = n.(BodyLessParameterNodeImpl).getIndirectionIndex()
237-
}
238-
239-
/**
240-
* Gets the number of stars (i.e., `*`s) needed to produce the `toString`
241-
* output for `n`.
242-
*/
243-
string stars(Node n) { result = repeatStars(getNumberOfIndirections(n)) }
225+
private int getNumberOfIndirections(Node n) {
226+
result = n.(RawIndirectOperand).getIndirectionIndex()
227+
or
228+
result = n.(RawIndirectInstruction).getIndirectionIndex()
229+
or
230+
result = n.(VariableNode).getIndirectionIndex()
231+
or
232+
result = n.(PostUpdateNodeImpl).getIndirectionIndex()
233+
or
234+
result = n.(FinalParameterNode).getIndirectionIndex()
235+
or
236+
result = n.(BodyLessParameterNodeImpl).getIndirectionIndex()
244237
}
245238

246-
import NodeStars
239+
/**
240+
* Gets the number of stars (i.e., `*`s) needed to produce the `toString`
241+
* output for `n`.
242+
*/
243+
string stars(Node n) { result = repeatStars(getNumberOfIndirections(n)) }
247244

248245
/**
249246
* A cut-down `DataFlow::Node` class that does not depend on the output of SSA.

0 commit comments

Comments
 (0)