C++: Fix more consistency errors.

This commit is contained in:
Mathias Vorreiter Pedersen
2026-03-30 12:08:08 +01:00
parent 9247e6af0c
commit 5db069eb56
2 changed files with 7 additions and 4 deletions

View File

@@ -1687,7 +1687,9 @@ private class IndirectInstructionParameterNode extends AbstractIndirectParameter
InitializeParameterInstruction init;
IndirectInstructionParameterNode() {
IndirectInstruction.super.hasInstructionAndIndirectionIndex(init, _)
IndirectInstruction.super.hasInstructionAndIndirectionIndex(init, _) and
// We don't model catch parameters as parameter nodes
not exists(init.getParameter().getCatchBlock())
}
int getArgumentIndex() { init.hasIndex(result) }
@@ -1759,7 +1761,10 @@ abstract private class AbstractExplicitParameterNode extends AbstractDirectParam
private class ExplicitParameterInstructionNode extends AbstractExplicitParameterNode,
InstructionDirectParameterNode
{
ExplicitParameterInstructionNode() { exists(instr.getParameter()) }
ExplicitParameterInstructionNode() {
// We don't model catch parameters as parameter nodes.
exists(instr.getParameter().getFunction())
}
override string toStringImpl() { result = instr.getParameter().toString() }
}

View File

@@ -29,8 +29,6 @@ postWithInFlow
| try_catch.cpp:7:8:7:8 | call to exception | PostUpdateNode should not be the target of local flow. |
viableImplInCallContextTooLarge
uniqueParameterNodeAtPosition
| ir.cpp:726:6:726:13 | TryCatch | *0 | ir.cpp:737:22:737:22 | *s | Parameters with overlapping positions. |
| ir.cpp:726:6:726:13 | TryCatch | *0 | ir.cpp:740:24:740:24 | *e | Parameters with overlapping positions. |
uniqueParameterNodePosition
uniqueContentApprox
identityLocalStep