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

Skip to content

Commit f8cfcef

Browse files
author
Robert Marsh
committed
C++/C#: document isThisIndirection and sync files
1 parent a638a08 commit f8cfcef

5 files changed

Lines changed: 23 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,9 @@ class ReturnIndirectionInstruction extends VariableInstruction {
542542
*/
543543
final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() }
544544

545+
/**
546+
* Holds if this instruction is the return indirection for `this`.
547+
*/
545548
final predicate isThisIndirection() { var instanceof IRThisVariable }
546549
}
547550

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ class ReturnIndirectionInstruction extends VariableInstruction {
541541
* function.
542542
*/
543543
final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() }
544+
545+
/**
546+
* Holds if this instruction is the return indirection for `this`.
547+
*/
548+
final predicate isThisIndirection() { var instanceof IRThisVariable }
544549
}
545550

546551
class CopyInstruction extends Instruction {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ class ReturnIndirectionInstruction extends VariableInstruction {
541541
* function.
542542
*/
543543
final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() }
544+
545+
/**
546+
* Holds if this instruction is the return indirection for `this`.
547+
*/
548+
final predicate isThisIndirection() { var instanceof IRThisVariable }
544549
}
545550

546551
class CopyInstruction extends Instruction {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ class ReturnIndirectionInstruction extends VariableInstruction {
541541
* function.
542542
*/
543543
final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() }
544+
545+
/**
546+
* Holds if this instruction is the return indirection for `this`.
547+
*/
548+
final predicate isThisIndirection() { var instanceof IRThisVariable }
544549
}
545550

546551
class CopyInstruction extends Instruction {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ class ReturnIndirectionInstruction extends VariableInstruction {
541541
* function.
542542
*/
543543
final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() }
544+
545+
/**
546+
* Holds if this instruction is the return indirection for `this`.
547+
*/
548+
final predicate isThisIndirection() { var instanceof IRThisVariable }
544549
}
545550

546551
class CopyInstruction extends Instruction {

0 commit comments

Comments
 (0)