Skip to content

Commit 62a656d

Browse files
authored
Merge pull request github#3860 from dbartol/codeql-c-analysis-team/40/2
C++: QLDoc cleanup
2 parents 45ef3ec + f0215d1 commit 62a656d

File tree

15 files changed

+65
-25
lines changed

15 files changed

+65
-25
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
2727
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }
2828

2929
/**
30+
* INTERNAL: Do not use.
31+
*
3032
* Gets a string that uniquely identifies this block within its enclosing function.
3133
*
3234
* This predicate is used by debugging and printing code only.
3335
*/
3436
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }
3537

3638
/**
39+
* INTERNAL: Do not use.
40+
*
3741
* Gets the zero-based index of the block within its function.
3842
*
3943
* This predicate is used by debugging and printing code only.
@@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
6771
}
6872

6973
/**
70-
* Get the instructions in this block, including `Phi` instructions.
74+
* Gets an instruction in this block. This includes `Phi` instructions.
7175
*/
7276
final Instruction getAnInstruction() {
7377
result = getInstruction(_) or
@@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
111115
*/
112116
class IRBlock extends IRBlockBase {
113117
/**
114-
* Gets the blocks to which control flows directly from this block.
118+
* Gets a block to which control flows directly from this block.
115119
*/
116120
final IRBlock getASuccessor() { blockSuccessor(this, result) }
117121

118122
/**
119-
* Gets the blocks from which control flows directly to this block.
123+
* Gets a block from which control flows directly to this block.
120124
*/
121125
final IRBlock getAPredecessor() { blockSuccessor(result, this) }
122126

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

158162
/**
159-
* Gets the set of blocks on the dominance frontier of this block.
163+
* Gets a block on the dominance frontier of this block.
160164
*
161165
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
162166
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ class IRGeneratedVariable extends IRVariable {
164164
override string getUniqueId() { none() }
165165

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

177179
/**
180+
* INTERNAL: Do not use.
181+
*
178182
* Gets the string that is combined with the location of the variable to generate the string
179183
* representation of this variable.
180184
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ class BuiltInOperationInstruction extends Instruction {
19891989
}
19901990

19911991
/**
1992-
* Gets the language-specific `BuildInOperation` object that specifies the operation that is
1992+
* Gets the language-specific `BuiltInOperation` object that specifies the operation that is
19931993
* performed by this instruction.
19941994
*/
19951995
final Language::BuiltInOperation getBuiltInOperation() { result = operation }

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
2727
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }
2828

2929
/**
30+
* INTERNAL: Do not use.
31+
*
3032
* Gets a string that uniquely identifies this block within its enclosing function.
3133
*
3234
* This predicate is used by debugging and printing code only.
3335
*/
3436
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }
3537

3638
/**
39+
* INTERNAL: Do not use.
40+
*
3741
* Gets the zero-based index of the block within its function.
3842
*
3943
* This predicate is used by debugging and printing code only.
@@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
6771
}
6872

6973
/**
70-
* Get the instructions in this block, including `Phi` instructions.
74+
* Gets an instruction in this block. This includes `Phi` instructions.
7175
*/
7276
final Instruction getAnInstruction() {
7377
result = getInstruction(_) or
@@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
111115
*/
112116
class IRBlock extends IRBlockBase {
113117
/**
114-
* Gets the blocks to which control flows directly from this block.
118+
* Gets a block to which control flows directly from this block.
115119
*/
116120
final IRBlock getASuccessor() { blockSuccessor(this, result) }
117121

118122
/**
119-
* Gets the blocks from which control flows directly to this block.
123+
* Gets a block from which control flows directly to this block.
120124
*/
121125
final IRBlock getAPredecessor() { blockSuccessor(result, this) }
122126

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

158162
/**
159-
* Gets the set of blocks on the dominance frontier of this block.
163+
* Gets a block on the dominance frontier of this block.
160164
*
161165
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
162166
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ class IRGeneratedVariable extends IRVariable {
164164
override string getUniqueId() { none() }
165165

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

177179
/**
180+
* INTERNAL: Do not use.
181+
*
178182
* Gets the string that is combined with the location of the variable to generate the string
179183
* representation of this variable.
180184
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ class BuiltInOperationInstruction extends Instruction {
19891989
}
19901990

19911991
/**
1992-
* Gets the language-specific `BuildInOperation` object that specifies the operation that is
1992+
* Gets the language-specific `BuiltInOperation` object that specifies the operation that is
19931993
* performed by this instruction.
19941994
*/
19951995
final Language::BuiltInOperation getBuiltInOperation() { result = operation }

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
2727
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }
2828

2929
/**
30+
* INTERNAL: Do not use.
31+
*
3032
* Gets a string that uniquely identifies this block within its enclosing function.
3133
*
3234
* This predicate is used by debugging and printing code only.
3335
*/
3436
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }
3537

3638
/**
39+
* INTERNAL: Do not use.
40+
*
3741
* Gets the zero-based index of the block within its function.
3842
*
3943
* This predicate is used by debugging and printing code only.
@@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
6771
}
6872

6973
/**
70-
* Get the instructions in this block, including `Phi` instructions.
74+
* Gets an instruction in this block. This includes `Phi` instructions.
7175
*/
7276
final Instruction getAnInstruction() {
7377
result = getInstruction(_) or
@@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
111115
*/
112116
class IRBlock extends IRBlockBase {
113117
/**
114-
* Gets the blocks to which control flows directly from this block.
118+
* Gets a block to which control flows directly from this block.
115119
*/
116120
final IRBlock getASuccessor() { blockSuccessor(this, result) }
117121

118122
/**
119-
* Gets the blocks from which control flows directly to this block.
123+
* Gets a block from which control flows directly to this block.
120124
*/
121125
final IRBlock getAPredecessor() { blockSuccessor(result, this) }
122126

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

158162
/**
159-
* Gets the set of blocks on the dominance frontier of this block.
163+
* Gets a block on the dominance frontier of this block.
160164
*
161165
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
162166
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ class IRGeneratedVariable extends IRVariable {
164164
override string getUniqueId() { none() }
165165

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

177179
/**
180+
* INTERNAL: Do not use.
181+
*
178182
* Gets the string that is combined with the location of the variable to generate the string
179183
* representation of this variable.
180184
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ class BuiltInOperationInstruction extends Instruction {
19891989
}
19901990

19911991
/**
1992-
* Gets the language-specific `BuildInOperation` object that specifies the operation that is
1992+
* Gets the language-specific `BuiltInOperation` object that specifies the operation that is
19931993
* performed by this instruction.
19941994
*/
19951995
final Language::BuiltInOperation getBuiltInOperation() { result = operation }

csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ class IRBlockBase extends TIRBlock {
2727
final Language::Location getLocation() { result = getFirstInstruction().getLocation() }
2828

2929
/**
30+
* INTERNAL: Do not use.
31+
*
3032
* Gets a string that uniquely identifies this block within its enclosing function.
3133
*
3234
* This predicate is used by debugging and printing code only.
3335
*/
3436
final string getUniqueId() { result = getFirstInstruction(this).getUniqueId() }
3537

3638
/**
39+
* INTERNAL: Do not use.
40+
*
3741
* Gets the zero-based index of the block within its function.
3842
*
3943
* This predicate is used by debugging and printing code only.
@@ -67,7 +71,7 @@ class IRBlockBase extends TIRBlock {
6771
}
6872

6973
/**
70-
* Get the instructions in this block, including `Phi` instructions.
74+
* Gets an instruction in this block. This includes `Phi` instructions.
7175
*/
7276
final Instruction getAnInstruction() {
7377
result = getInstruction(_) or
@@ -111,12 +115,12 @@ class IRBlockBase extends TIRBlock {
111115
*/
112116
class IRBlock extends IRBlockBase {
113117
/**
114-
* Gets the blocks to which control flows directly from this block.
118+
* Gets a block to which control flows directly from this block.
115119
*/
116120
final IRBlock getASuccessor() { blockSuccessor(this, result) }
117121

118122
/**
119-
* Gets the blocks from which control flows directly to this block.
123+
* Gets a block from which control flows directly to this block.
120124
*/
121125
final IRBlock getAPredecessor() { blockSuccessor(result, this) }
122126

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

158162
/**
159-
* Gets the set of blocks on the dominance frontier of this block.
163+
* Gets a block on the dominance frontier of this block.
160164
*
161165
* The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not
162166
* dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`.

0 commit comments

Comments
 (0)