Skip to content

Commit 2a94da3

Browse files
committed
C++: Add QLDoc. Also actually implement 'uninitializedNode' since there's no reason not to do so.
1 parent 1139059 commit 2a94da3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -926,19 +926,25 @@ module Public {
926926
}
927927

928928
/**
929-
* DEPRECATED: See UninitializedNode.
930-
*
931929
* Gets the `Node` corresponding to the value of an uninitialized local
932930
* variable `v`.
933931
*/
934-
Node uninitializedNode(LocalVariable v) { none() }
932+
Node uninitializedNode(LocalVariable v) { result.asUninitialized() = v }
935933

934+
/**
935+
* Holds if `indirectOperand` is the dataflow node that represents the
936+
* indirection of `operand` with indirection index `indirectionIndex`.
937+
*/
936938
predicate hasOperandAndIndex(
937939
IndirectOperand indirectOperand, Operand operand, int indirectionIndex
938940
) {
939941
indirectOperand.hasOperandAndIndirectionIndex(operand, indirectionIndex)
940942
}
941943

944+
/**
945+
* Holds if `indirectInstr` is the dataflow node that represents the
946+
* indirection of `instr` with indirection index `indirectionIndex`.
947+
*/
942948
predicate hasInstructionAndIndex(
943949
IndirectInstruction indirectInstr, Instruction instr, int indirectionIndex
944950
) {

0 commit comments

Comments
 (0)