Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0a6c16

Browse files
committed
C++: Add missing QLDoc.
1 parent 1a1f078 commit e0a6c16

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ private class RawIndirectOperand extends Node, TRawIndirectOperand {
646646
/** Gets the underlying instruction. */
647647
Operand getOperand() { result = operand }
648648

649+
/** Gets the underlying indirection index. */
649650
int getIndirectionIndex() { result = indirectionIndex }
650651

651652
override Function getFunction() { result = this.getOperand().getDef().getEnclosingFunction() }
@@ -665,6 +666,15 @@ private class RawIndirectOperand extends Node, TRawIndirectOperand {
665666
}
666667
}
667668

669+
/**
670+
* INTERNAL: Do not use.
671+
*
672+
* A node that represents the indirect value of an operand in the IR
673+
* after `index` number of loads.
674+
*
675+
* Note: Unlike `RawIndirectOperand`, a value of type `IndirectOperand` may
676+
* be an `OperandNode`.
677+
*/
668678
class IndirectOperand extends Node {
669679
Operand operand;
670680
int indirectionIndex;
@@ -677,10 +687,16 @@ class IndirectOperand extends Node {
677687
Ssa::getIRRepresentationOfIndirectOperand(operand, indirectionIndex)
678688
}
679689

690+
/** Gets the underlying operand. */
680691
Operand getOperand() { result = operand }
681692

693+
/** Gets the underlying indirection index. */
682694
int getIndirectionIndex() { result = indirectionIndex }
683695

696+
/**
697+
* Holds if this `IndirectOperand` is represented directly in the IR instead of
698+
* a `RawIndirectionOperand` with operand `op` and indirection index `index`.
699+
*/
684700
predicate isIRRepresentationOf(Operand op, int index) {
685701
this instanceof OperandNode and
686702
(
@@ -724,6 +740,7 @@ private class RawIndirectInstruction extends Node, TRawIndirectInstruction {
724740
/** Gets the underlying instruction. */
725741
Instruction getInstruction() { result = instr }
726742

743+
/** Gets the underlying indirection index. */
727744
int getIndirectionIndex() { result = indirectionIndex }
728745

729746
override Function getFunction() { result = this.getInstruction().getEnclosingFunction() }
@@ -743,6 +760,15 @@ private class RawIndirectInstruction extends Node, TRawIndirectInstruction {
743760
}
744761
}
745762

763+
/**
764+
* INTERNAL: Do not use.
765+
*
766+
* A node that represents the indirect value of an instruction in the IR
767+
* after `index` number of loads.
768+
*
769+
* Note: Unlike `RawIndirectInstruction`, a value of type `IndirectInstruction` may
770+
* be an `InstructionNode`.
771+
*/
746772
class IndirectInstruction extends Node {
747773
Instruction instr;
748774
int indirectionIndex;
@@ -755,10 +781,16 @@ class IndirectInstruction extends Node {
755781
Ssa::getIRRepresentationOfIndirectInstruction(instr, indirectionIndex)
756782
}
757783

784+
/** Gets the underlying instruction. */
758785
Instruction getInstruction() { result = instr }
759786

787+
/** Gets the underlying indirection index. */
760788
int getIndirectionIndex() { result = indirectionIndex }
761789

790+
/**
791+
* Holds if this `IndirectInstruction` is represented directly in the IR instead of
792+
* a `RawIndirectionInstruction` with instruction `i` and indirection index `index`.
793+
*/
762794
predicate isIRRepresentationOf(Instruction i, int index) {
763795
this instanceof InstructionNode and
764796
(

0 commit comments

Comments
 (0)