C++: Silence warnings.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-12-19 12:29:16 +01:00
parent 4844c43f06
commit 95cd31fce3
2 changed files with 10 additions and 0 deletions

View File

@@ -9,6 +9,11 @@ private import Node0ToString
private import DataFlowUtil
private class DebugNode0ToString extends Node0ToString {
DebugNode0ToString() {
// Silence warning about `this` not being bound.
exists(this)
}
override string instructionToString(Instruction i) { result = i.getDumpString() }
override string operandToString(Operand op) {

View File

@@ -10,6 +10,11 @@ private import DataFlowUtil
private import DataFlowPrivate
private class NormalNode0ToString extends Node0ToString {
NormalNode0ToString() {
// Silence warning about `this` not being bound.
exists(this)
}
override string instructionToString(Instruction i) {
if i.(InitializeParameterInstruction).getIRVariable() instanceof IRThisVariable
then result = "this"