Skip to content

Commit 062c62f

Browse files
committed
Document code copy and clean up imports
1 parent 08b8bf7 commit 062c62f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cpp/misra/src/rules/RULE-8-7-1/PointerArithmeticFormsAnInvalidPointer.ql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ class PointerFormation extends TPointerFormation {
148148
}
149149

150150
/**
151-
* NOTE
151+
* NOTE The code in the below module is copied from
152+
* `cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll` in `github/codeql`, commit hash
153+
* `960e990`. This commit hash is the latest of the ones with tag `codeql-cli-2.21.4` which is the CLI version
154+
* compatible with `codeql/cpp-all: 5.0.0` that this query depends on.
152155
*/
153156
module Copied {
154-
import semmle.code.cpp.ir.IR // For PointerArithmeticInstruction (see TrackArray::isAdditionalFlowStep/2 below)
155-
import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate // For PointerArithmeticInstruction (see TrackArray::isAdditionalFlowStep/2 below)
156-
import semmle.code.cpp.ir.dataflow.internal.DataFlowUtil // For PointerArithmeticInstruction (see TrackArray::isAdditionalFlowStep/2 below)
157-
import semmle.code.cpp.ir.dataflow.FlowSteps // For PointerArithmeticInstruction (see TrackArray::isAdditionalFlowStep/2 below)
157+
import semmle.code.cpp.ir.IR
158158
import semmle.code.cpp.ir.dataflow.internal.SsaInternals as Ssa
159159

160160
predicate operandToInstructionTaintStep(Operand opFrom, Instruction instrTo) {

0 commit comments

Comments
 (0)