Skip to content

Commit 2d7a7d3

Browse files
committed
C++: respond to PR comments
1 parent d544771 commit 2d7a7d3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/semantic/SemanticExprSpecific.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ module SemanticExprConfig {
133133
IR::Operand asOperand() { none() }
134134
}
135135

136-
class SsaInstructionVariable extends SsaVariable, TSsaInstruction {
136+
private class SsaInstructionVariable extends SsaVariable, TSsaInstruction {
137137
IR::Instruction instr;
138138

139139
SsaInstructionVariable() { this = TSsaInstruction(instr) }
@@ -145,10 +145,10 @@ module SemanticExprConfig {
145145
final override IR::Instruction asInstruction() { result = instr }
146146
}
147147

148-
class SsaOperand extends SsaVariable, TSsaOperand {
148+
private class SsaOperandVariable extends SsaVariable, TSsaOperand {
149149
IR::Operand op;
150150

151-
SsaOperand() { this = TSsaOperand(op) }
151+
SsaOperandVariable() { this = TSsaOperand(op) }
152152

153153
final override string toString() { result = op.toString() }
154154

@@ -162,7 +162,7 @@ module SemanticExprConfig {
162162
predicate phi(SsaVariable v) { v.asInstruction() instanceof IR::PhiInstruction }
163163

164164
SsaVariable getAPhiInput(SsaVariable v) {
165-
exists(IR::PhiInstruction instr |
165+
exists(IR::PhiInstruction instr | v.asInstruction() = instr |
166166
result.asInstruction() = instr.getAnInput()
167167
or
168168
result.asOperand() = instr.getAnInputOperand()

cpp/ql/test/library-tests/ir/modulus-analysis/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*template<typename T> void mod(T value);
1+
template<typename T> void mod(T value);
22

33
const int c1 = 42;
44
const int c2 = 43;
@@ -57,7 +57,7 @@ void loops(int cap)
5757

5858
for (int k = 0; k < cap; k += 3)
5959
mod(k); // $ mod=0,0,3
60-
}*/
60+
}
6161

6262
int loops2 (unsigned int *i) {
6363
for (; *i <= 2; (*i)++) {

0 commit comments

Comments
 (0)