Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }

/**
* INTERNAL: Do not use.
*
* Gets a string that uniquely identifies this block within its enclosing function.
*
* This predicate is used by debugging and printing code only.
*/
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }

/**
* INTERNAL: Do not use.
*
* Gets the zero-based index of the block within its function.
*
* This predicate is used by debugging and printing code only.
Expand Down Expand Up @@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
}

/**
* Get the instructions in this block, including `Phi` instructions.
* Gets an instruction in this block. This includes `Phi` instructions.
*/
final Instruction getAnInstruction() {
result = getInstruction(_) or
Expand Down Expand Up @@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
*/
class IRBlock extends IRBlockBase {
/**
* Gets the blocks to which control flows directly from this block.
* Gets a block to which control flows directly from this block.
*/
final IRBlock getASuccessor() { blockSuccessor(this, result) }

/**
* Gets the blocks from which control flows directly to this block.
* Gets a block from which control flows directly to this block.
*/
final IRBlock getAPredecessor() { blockSuccessor(result, this) }

Expand Down Expand Up @@ -156,7 +160,7 @@ class IRBlock extends IRBlockBase {
final predicate dominates(IRBlock block) { strictlyDominates(block) or this = block }

/**
* Gets the set of blocks on the dominance frontier of this block.
* Gets a block on the dominance frontier of this block.
*
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ class IRGeneratedVariable extends IRVariable {
override string getUniqueId() { none() }

/**
* INTERNAL: Do not use.
*
* Gets a string containing the source code location of the AST that generated this variable.
*
* This is used by debugging and printing code only.
Expand All @@ -175,6 +177,8 @@ class IRGeneratedVariable extends IRVariable {
}

/**
* INTERNAL: Do not use.
*
* Gets the string that is combined with the location of the variable to generate the string
* representation of this variable.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ class BuiltInOperationInstruction extends Instruction {
}

/**
* Gets the language-specific `BuildInOperation` object that specifies the operation that is
* Gets the language-specific `BuiltInOperation` object that specifies the operation that is
* performed by this instruction.
*/
final Language::BuiltInOperation getBuiltInOperation() { result = operation }
Expand Down
12 changes: 8 additions & 4 deletions cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRBlock.qll
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }

/**
* INTERNAL: Do not use.
*
* Gets a string that uniquely identifies this block within its enclosing function.
*
* This predicate is used by debugging and printing code only.
*/
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }

/**
* INTERNAL: Do not use.
*
* Gets the zero-based index of the block within its function.
*
* This predicate is used by debugging and printing code only.
Expand Down Expand Up @@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
}

/**
* Get the instructions in this block, including `Phi` instructions.
* Gets an instruction in this block. This includes `Phi` instructions.
*/
final Instruction getAnInstruction() {
result = getInstruction(_) or
Expand Down Expand Up @@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
*/
class IRBlock extends IRBlockBase {
/**
* Gets the blocks to which control flows directly from this block.
* Gets a block to which control flows directly from this block.
*/
final IRBlock getASuccessor() { blockSuccessor(this, result) }

/**
* Gets the blocks from which control flows directly to this block.
* Gets a block from which control flows directly to this block.
*/
final IRBlock getAPredecessor() { blockSuccessor(result, this) }

Expand Down Expand Up @@ -156,7 +160,7 @@ class IRBlock extends IRBlockBase {
final predicate dominates(IRBlock block) { strictlyDominates(block) or this = block }

/**
* Gets the set of blocks on the dominance frontier of this block.
* Gets a block on the dominance frontier of this block.
*
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ class IRGeneratedVariable extends IRVariable {
override string getUniqueId() { none() }

/**
* INTERNAL: Do not use.
*
* Gets a string containing the source code location of the AST that generated this variable.
*
* This is used by debugging and printing code only.
Expand All @@ -175,6 +177,8 @@ class IRGeneratedVariable extends IRVariable {
}

/**
* INTERNAL: Do not use.
*
* Gets the string that is combined with the location of the variable to generate the string
* representation of this variable.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ class BuiltInOperationInstruction extends Instruction {
}

/**
* Gets the language-specific `BuildInOperation` object that specifies the operation that is
* Gets the language-specific `BuiltInOperation` object that specifies the operation that is
* performed by this instruction.
*/
final Language::BuiltInOperation getBuiltInOperation() { result = operation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }

/**
* INTERNAL: Do not use.
*
* Gets a string that uniquely identifies this block within its enclosing function.
*
* This predicate is used by debugging and printing code only.
*/
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }

/**
* INTERNAL: Do not use.
*
* Gets the zero-based index of the block within its function.
*
* This predicate is used by debugging and printing code only.
Expand Down Expand Up @@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
}

/**
* Get the instructions in this block, including `Phi` instructions.
* Gets an instruction in this block. This includes `Phi` instructions.
*/
final Instruction getAnInstruction() {
result = getInstruction(_) or
Expand Down Expand Up @@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
*/
class IRBlock extends IRBlockBase {
/**
* Gets the blocks to which control flows directly from this block.
* Gets a block to which control flows directly from this block.
*/
final IRBlock getASuccessor() { blockSuccessor(this, result) }

/**
* Gets the blocks from which control flows directly to this block.
* Gets a block from which control flows directly to this block.
*/
final IRBlock getAPredecessor() { blockSuccessor(result, this) }

Expand Down Expand Up @@ -156,7 +160,7 @@ class IRBlock extends IRBlockBase {
final predicate dominates(IRBlock block) { strictlyDominates(block) or this = block }

/**
* Gets the set of blocks on the dominance frontier of this block.
* Gets a block on the dominance frontier of this block.
*
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ class IRGeneratedVariable extends IRVariable {
override string getUniqueId() { none() }

/**
* INTERNAL: Do not use.
*
* Gets a string containing the source code location of the AST that generated this variable.
*
* This is used by debugging and printing code only.
Expand All @@ -175,6 +177,8 @@ class IRGeneratedVariable extends IRVariable {
}

/**
* INTERNAL: Do not use.
*
* Gets the string that is combined with the location of the variable to generate the string
* representation of this variable.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ class BuiltInOperationInstruction extends Instruction {
}

/**
* Gets the language-specific `BuildInOperation` object that specifies the operation that is
* Gets the language-specific `BuiltInOperation` object that specifies the operation that is
* performed by this instruction.
*/
final Language::BuiltInOperation getBuiltInOperation() { result = operation }
Expand Down
12 changes: 8 additions & 4 deletions csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }

/**
* INTERNAL: Do not use.
*
* Gets a string that uniquely identifies this block within its enclosing function.
*
* This predicate is used by debugging and printing code only.
*/
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }

/**
* INTERNAL: Do not use.
*
* Gets the zero-based index of the block within its function.
*
* This predicate is used by debugging and printing code only.
Expand Down Expand Up @@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
}

/**
* Get the instructions in this block, including `Phi` instructions.
* Gets an instruction in this block. This includes `Phi` instructions.
*/
final Instruction getAnInstruction() {
result = getInstruction(_) or
Expand Down Expand Up @@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
*/
class IRBlock extends IRBlockBase {
/**
* Gets the blocks to which control flows directly from this block.
* Gets a block to which control flows directly from this block.
*/
final IRBlock getASuccessor() { blockSuccessor(this, result) }

/**
* Gets the blocks from which control flows directly to this block.
* Gets a block from which control flows directly to this block.
*/
final IRBlock getAPredecessor() { blockSuccessor(result, this) }

Expand Down Expand Up @@ -156,7 +160,7 @@ class IRBlock extends IRBlockBase {
final predicate dominates(IRBlock block) { strictlyDominates(block) or this = block }

/**
* Gets the set of blocks on the dominance frontier of this block.
* Gets a block on the dominance frontier of this block.
*
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ class IRGeneratedVariable extends IRVariable {
override string getUniqueId() { none() }

/**
* INTERNAL: Do not use.
*
* Gets a string containing the source code location of the AST that generated this variable.
*
* This is used by debugging and printing code only.
Expand All @@ -175,6 +177,8 @@ class IRGeneratedVariable extends IRVariable {
}

/**
* INTERNAL: Do not use.
*
* Gets the string that is combined with the location of the variable to generate the string
* representation of this variable.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ class BuiltInOperationInstruction extends Instruction {
}

/**
* Gets the language-specific `BuildInOperation` object that specifies the operation that is
* Gets the language-specific `BuiltInOperation` object that specifies the operation that is
* performed by this instruction.
*/
final Language::BuiltInOperation getBuiltInOperation() { result = operation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }

/**
* INTERNAL: Do not use.
*
* Gets a string that uniquely identifies this block within its enclosing function.
*
* This predicate is used by debugging and printing code only.
*/
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }

/**
* INTERNAL: Do not use.
*
* Gets the zero-based index of the block within its function.
*
* This predicate is used by debugging and printing code only.
Expand Down Expand Up @@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
}

/**
* Get the instructions in this block, including `Phi` instructions.
* Gets an instruction in this block. This includes `Phi` instructions.
*/
final Instruction getAnInstruction() {
result = getInstruction(_) or
Expand Down Expand Up @@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
*/
class IRBlock extends IRBlockBase {
/**
* Gets the blocks to which control flows directly from this block.
* Gets a block to which control flows directly from this block.
*/
final IRBlock getASuccessor() { blockSuccessor(this, result) }

/**
* Gets the blocks from which control flows directly to this block.
* Gets a block from which control flows directly to this block.
*/
final IRBlock getAPredecessor() { blockSuccessor(result, this) }

Expand Down Expand Up @@ -156,7 +160,7 @@ class IRBlock extends IRBlockBase {
final predicate dominates(IRBlock block) { strictlyDominates(block) or this = block }

/**
* Gets the set of blocks on the dominance frontier of this block.
* Gets a block on the dominance frontier of this block.
*
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ class IRGeneratedVariable extends IRVariable {
override string getUniqueId() { none() }

/**
* INTERNAL: Do not use.
*
* Gets a string containing the source code location of the AST that generated this variable.
*
* This is used by debugging and printing code only.
Expand All @@ -175,6 +177,8 @@ class IRGeneratedVariable extends IRVariable {
}

/**
* INTERNAL: Do not use.
*
* Gets the string that is combined with the location of the variable to generate the string
* representation of this variable.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ class BuiltInOperationInstruction extends Instruction {
}

/**
* Gets the language-specific `BuildInOperation` object that specifies the operation that is
* Gets the language-specific `BuiltInOperation` object that specifies the operation that is
* performed by this instruction.
*/
final Language::BuiltInOperation getBuiltInOperation() { result = operation }
Expand Down