We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12a717e commit 14faa5dCopy full SHA for 14faa5d
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
@@ -254,9 +254,7 @@ class Node extends TIRDataFlowNode {
254
* after the `f` has returned.
255
*/
256
Expr asDefiningArgument(int index) {
257
- // Subtract one because `DefinitionByReferenceNode` is defined to be in
258
- // the range `[0 ... n - 1]` for some `n` instead of `[1 ... n]`.
259
- this.(DefinitionByReferenceNode).getIndirectionIndex() = index - 1 and
+ this.(DefinitionByReferenceNode).getIndirectionIndex() = index and
260
result = this.(DefinitionByReferenceNode).getArgument()
261
}
262
0 commit comments