diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll index b9f320e57b23..f638abe27e6b 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll @@ -1156,6 +1156,12 @@ class Definition extends SsaImpl::Definition { ) } + Parameter asParameter() { + this.getIndirectionIndex() = 0 and + getDefImpl(this).getValue().asInstruction().(InitializeParameterInstruction).getParameter() = + result + } + /** * Gets an `Operand` that represents an indirect use of this definition. *