File tree Expand file tree Collapse file tree 5 files changed +45
-15
lines changed
cpp/ql/src/semmle/code/cpp/ir/implementation
csharp/ql/src/semmle/code/csharp/ir/implementation Expand file tree Collapse file tree 5 files changed +45
-15
lines changed Original file line number Diff line number Diff line change @@ -1341,17 +1341,23 @@ class SizedBufferMayWriteSideEffectInstruction extends WriteSideEffectInstructio
13411341}
13421342
13431343/**
1344- *
1344+ * An instruction representing the initial value of newly allocated memory, e.g. the result of a
1345+ * call to `malloc`
13451346 */
13461347class InitializeDynamicAllocationInstruction extends SideEffectInstruction {
13471348 InitializeDynamicAllocationInstruction ( ) {
13481349 getOpcode ( ) instanceof Opcode:: InitializeDynamicAllocation
13491350 }
1350-
1351+
1352+ /**
1353+ * Gets the address of the allocation this instruction is initializing.
1354+ */
13511355 final AddressOperand getAllocationAddressOperand ( ) { result = getAnOperand ( ) }
13521356
1357+ /**
1358+ * Gets the operand for the allocation this instruction is initializing.
1359+ */
13531360 final Instruction getAllocationAddress ( ) { result = getAllocationAddressOperand ( ) .getDef ( ) }
1354-
13551361}
13561362
13571363/**
Original file line number Diff line number Diff line change @@ -1341,17 +1341,23 @@ class SizedBufferMayWriteSideEffectInstruction extends WriteSideEffectInstructio
13411341}
13421342
13431343/**
1344- *
1344+ * An instruction representing the initial value of newly allocated memory, e.g. the result of a
1345+ * call to `malloc`
13451346 */
13461347class InitializeDynamicAllocationInstruction extends SideEffectInstruction {
13471348 InitializeDynamicAllocationInstruction ( ) {
13481349 getOpcode ( ) instanceof Opcode:: InitializeDynamicAllocation
13491350 }
1350-
1351+
1352+ /**
1353+ * Gets the address of the allocation this instruction is initializing.
1354+ */
13511355 final AddressOperand getAllocationAddressOperand ( ) { result = getAnOperand ( ) }
13521356
1357+ /**
1358+ * Gets the operand for the allocation this instruction is initializing.
1359+ */
13531360 final Instruction getAllocationAddress ( ) { result = getAllocationAddressOperand ( ) .getDef ( ) }
1354-
13551361}
13561362
13571363/**
Original file line number Diff line number Diff line change @@ -1341,17 +1341,23 @@ class SizedBufferMayWriteSideEffectInstruction extends WriteSideEffectInstructio
13411341}
13421342
13431343/**
1344- *
1344+ * An instruction representing the initial value of newly allocated memory, e.g. the result of a
1345+ * call to `malloc`
13451346 */
13461347class InitializeDynamicAllocationInstruction extends SideEffectInstruction {
13471348 InitializeDynamicAllocationInstruction ( ) {
13481349 getOpcode ( ) instanceof Opcode:: InitializeDynamicAllocation
13491350 }
1350-
1351+
1352+ /**
1353+ * Gets the address of the allocation this instruction is initializing.
1354+ */
13511355 final AddressOperand getAllocationAddressOperand ( ) { result = getAnOperand ( ) }
13521356
1357+ /**
1358+ * Gets the operand for the allocation this instruction is initializing.
1359+ */
13531360 final Instruction getAllocationAddress ( ) { result = getAllocationAddressOperand ( ) .getDef ( ) }
1354-
13551361}
13561362
13571363/**
Original file line number Diff line number Diff line change @@ -1341,17 +1341,23 @@ class SizedBufferMayWriteSideEffectInstruction extends WriteSideEffectInstructio
13411341}
13421342
13431343/**
1344- *
1344+ * An instruction representing the initial value of newly allocated memory, e.g. the result of a
1345+ * call to `malloc`
13451346 */
13461347class InitializeDynamicAllocationInstruction extends SideEffectInstruction {
13471348 InitializeDynamicAllocationInstruction ( ) {
13481349 getOpcode ( ) instanceof Opcode:: InitializeDynamicAllocation
13491350 }
1350-
1351+
1352+ /**
1353+ * Gets the address of the allocation this instruction is initializing.
1354+ */
13511355 final AddressOperand getAllocationAddressOperand ( ) { result = getAnOperand ( ) }
13521356
1357+ /**
1358+ * Gets the operand for the allocation this instruction is initializing.
1359+ */
13531360 final Instruction getAllocationAddress ( ) { result = getAllocationAddressOperand ( ) .getDef ( ) }
1354-
13551361}
13561362
13571363/**
Original file line number Diff line number Diff line change @@ -1341,17 +1341,23 @@ class SizedBufferMayWriteSideEffectInstruction extends WriteSideEffectInstructio
13411341}
13421342
13431343/**
1344- *
1344+ * An instruction representing the initial value of newly allocated memory, e.g. the result of a
1345+ * call to `malloc`
13451346 */
13461347class InitializeDynamicAllocationInstruction extends SideEffectInstruction {
13471348 InitializeDynamicAllocationInstruction ( ) {
13481349 getOpcode ( ) instanceof Opcode:: InitializeDynamicAllocation
13491350 }
1350-
1351+
1352+ /**
1353+ * Gets the address of the allocation this instruction is initializing.
1354+ */
13511355 final AddressOperand getAllocationAddressOperand ( ) { result = getAnOperand ( ) }
13521356
1357+ /**
1358+ * Gets the operand for the allocation this instruction is initializing.
1359+ */
13531360 final Instruction getAllocationAddress ( ) { result = getAllocationAddressOperand ( ) .getDef ( ) }
1354-
13551361}
13561362
13571363/**
You can’t perform that action at this time.
0 commit comments