Skip to content

Commit d89fe63

Browse files
committed
C++: Add 'asParameter' on Definition.
1 parent 42104ec commit d89fe63

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,12 @@ class Definition extends SsaImpl::Definition {
11561156
)
11571157
}
11581158

1159+
Parameter asParameter() {
1160+
this.getIndirectionIndex() = 0 and
1161+
getDefImpl(this).getValue().asInstruction().(InitializeParameterInstruction).getParameter() =
1162+
result
1163+
}
1164+
11591165
/**
11601166
* Gets an `Operand` that represents an indirect use of this definition.
11611167
*

0 commit comments

Comments
 (0)