Skip to content

Commit d53f5aa

Browse files
authored
Merge pull request #1228 from jbj/ir-result-type-docs
Approved by dave-bartolomeo
2 parents 7ca5cc2 + 38310e0 commit d53f5aa

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class Instruction extends Construction::TInstruction {
404404
result = Construction::getInstructionConvertedResultExpression(this)
405405
}
406406

407-
/**
407+
/**
408408
* Gets the unconverted `Expr` whose result is computed by this instruction, if any.
409409
*/
410410
final Expr getUnconvertedResultExpression() {
@@ -414,6 +414,9 @@ class Instruction extends Construction::TInstruction {
414414
/**
415415
* Gets the type of the result produced by this instruction. If the
416416
* instruction does not produce a result, its result type will be `VoidType`.
417+
*
418+
* If `isGLValue()` holds, then the result type of this instruction should be
419+
* thought of as "pointer to `getResultType()`".
417420
*/
418421
final Type getResultType() {
419422
Construction::instructionHasType(this, result, _)

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Instruction.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class Instruction extends Construction::TInstruction {
404404
result = Construction::getInstructionConvertedResultExpression(this)
405405
}
406406

407-
/**
407+
/**
408408
* Gets the unconverted `Expr` whose result is computed by this instruction, if any.
409409
*/
410410
final Expr getUnconvertedResultExpression() {
@@ -414,6 +414,9 @@ class Instruction extends Construction::TInstruction {
414414
/**
415415
* Gets the type of the result produced by this instruction. If the
416416
* instruction does not produce a result, its result type will be `VoidType`.
417+
*
418+
* If `isGLValue()` holds, then the result type of this instruction should be
419+
* thought of as "pointer to `getResultType()`".
417420
*/
418421
final Type getResultType() {
419422
Construction::instructionHasType(this, result, _)

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class Instruction extends Construction::TInstruction {
404404
result = Construction::getInstructionConvertedResultExpression(this)
405405
}
406406

407-
/**
407+
/**
408408
* Gets the unconverted `Expr` whose result is computed by this instruction, if any.
409409
*/
410410
final Expr getUnconvertedResultExpression() {
@@ -414,6 +414,9 @@ class Instruction extends Construction::TInstruction {
414414
/**
415415
* Gets the type of the result produced by this instruction. If the
416416
* instruction does not produce a result, its result type will be `VoidType`.
417+
*
418+
* If `isGLValue()` holds, then the result type of this instruction should be
419+
* thought of as "pointer to `getResultType()`".
417420
*/
418421
final Type getResultType() {
419422
Construction::instructionHasType(this, result, _)

0 commit comments

Comments
 (0)