From 66611323e21808f19085aaf7ad337c4561d01a98 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Fri, 27 Feb 2026 12:04:57 +0000 Subject: [PATCH] C++: No need to keep this in its own module now. --- .../ir/dataflow/internal/DataFlowPrivate.qll | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll index 5b7736de2da..c43b300cfb4 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll @@ -222,28 +222,25 @@ private module Cached { import Cached - private int getNumberOfIndirections(Node n) { - result = n.(RawIndirectOperand).getIndirectionIndex() - or - result = n.(RawIndirectInstruction).getIndirectionIndex() - or - result = n.(VariableNode).getIndirectionIndex() - or - result = n.(PostUpdateNodeImpl).getIndirectionIndex() - or - result = n.(FinalParameterNode).getIndirectionIndex() - or - result = n.(BodyLessParameterNodeImpl).getIndirectionIndex() - } - - /** - * Gets the number of stars (i.e., `*`s) needed to produce the `toString` - * output for `n`. - */ - string stars(Node n) { result = repeatStars(getNumberOfIndirections(n)) } +private int getNumberOfIndirections(Node n) { + result = n.(RawIndirectOperand).getIndirectionIndex() + or + result = n.(RawIndirectInstruction).getIndirectionIndex() + or + result = n.(VariableNode).getIndirectionIndex() + or + result = n.(PostUpdateNodeImpl).getIndirectionIndex() + or + result = n.(FinalParameterNode).getIndirectionIndex() + or + result = n.(BodyLessParameterNodeImpl).getIndirectionIndex() } -import NodeStars +/** + * Gets the number of stars (i.e., `*`s) needed to produce the `toString` + * output for `n`. + */ +string stars(Node n) { result = repeatStars(getNumberOfIndirections(n)) } /** * A cut-down `DataFlow::Node` class that does not depend on the output of SSA.