Skip to content

Commit 95cd31f

Browse files
committed
C++: Silence warnings.
1 parent 4844c43 commit 95cd31f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DebugPrinting.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ private import Node0ToString
99
private import DataFlowUtil
1010

1111
private class DebugNode0ToString extends Node0ToString {
12+
DebugNode0ToString() {
13+
// Silence warning about `this` not being bound.
14+
exists(this)
15+
}
16+
1217
override string instructionToString(Instruction i) { result = i.getDumpString() }
1318

1419
override string operandToString(Operand op) {

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/NormalNode0ToString.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ private import DataFlowUtil
1010
private import DataFlowPrivate
1111

1212
private class NormalNode0ToString extends Node0ToString {
13+
NormalNode0ToString() {
14+
// Silence warning about `this` not being bound.
15+
exists(this)
16+
}
17+
1318
override string instructionToString(Instruction i) {
1419
if i.(InitializeParameterInstruction).getIRVariable() instanceof IRThisVariable
1520
then result = "this"

0 commit comments

Comments
 (0)