C++: Add missing overrides.

This commit is contained in:
Mathias Vorreiter Pedersen
2026-05-12 11:29:30 +01:00
parent e77d85f23e
commit 6d5d57acca
2 changed files with 12 additions and 2 deletions

View File

@@ -1357,6 +1357,16 @@ class PhiNode extends Definition instanceof SsaImpl::PhiNode {
final predicate hasInputFromBlock(Definition input, IRBlock bb) {
phiHasInputFromBlock(this, input, bb)
}
override int getIndirection() { result = this.getSourceVariable().getIndirection() }
override predicate isCertain() {
forex(Definition inp | inp = this.getAnInput() | inp.isCertain())
}
final override Declaration getFunction() {
result = SsaImpl::PhiNode.super.getBasicBlock().getEnclosingFunction()
}
}
/** An static single assignment (SSA) definition. */

View File

@@ -28,7 +28,7 @@ void test2(bool b) { // $ certain="SSA def(&b)" certain="SSA def(b)"
} else {
x = 1; // $ certain="SSA def(x)"
}
use(x); // $ uncertain="SSA phi(x)"
use(x); // $ certain="SSA phi(x)"
}
{
@@ -38,7 +38,7 @@ void test2(bool b) { // $ certain="SSA def(&b)" certain="SSA def(b)"
} else {
}
use(x); // $ uncertain="SSA phi(x)"
use(x); // $ certain="SSA phi(x)"
}
{