Skip to content

Commit 2c4bf13

Browse files
committed
C++: Sync identical files.
1 parent c54dc49 commit 2c4bf13

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,18 @@ class ChiInstruction extends Instruction {
21672167
*/
21682168
class InitializeGroupInstruction extends Instruction {
21692169
InitializeGroupInstruction() { this.getOpcode() instanceof Opcode::InitializeGroup }
2170+
2171+
/**
2172+
* Gets an `IRVariable` whose memory is initialized by this instruction, if any.
2173+
* Note: Allocations that are not represented as `IRVariable`s (such as
2174+
* dynamic allocations) are not returned by this predicate even if this
2175+
* instruction initializes such memory.
2176+
*/
2177+
final IRVariable getAnIRVariable() { result = Construction::getAnInitializeGroupVariable(this) }
2178+
2179+
final override string getImmediateString() {
2180+
result = strictconcat(this.getAnIRVariable().toString(), ",")
2181+
}
21702182
}
21712183

21722184
/**

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,18 @@ class ChiInstruction extends Instruction {
21672167
*/
21682168
class InitializeGroupInstruction extends Instruction {
21692169
InitializeGroupInstruction() { this.getOpcode() instanceof Opcode::InitializeGroup }
2170+
2171+
/**
2172+
* Gets an `IRVariable` whose memory is initialized by this instruction, if any.
2173+
* Note: Allocations that are not represented as `IRVariable`s (such as
2174+
* dynamic allocations) are not returned by this predicate even if this
2175+
* instruction initializes such memory.
2176+
*/
2177+
final IRVariable getAnIRVariable() { result = Construction::getAnInitializeGroupVariable(this) }
2178+
2179+
final override string getImmediateString() {
2180+
result = strictconcat(this.getAnIRVariable().toString(), ",")
2181+
}
21702182
}
21712183

21722184
/**

0 commit comments

Comments
 (0)