Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cebd5c commit 235a069Copy full SHA for 235a069
1 file changed
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
@@ -235,7 +235,13 @@ class Node extends TIRDataFlowNode {
235
Expr asIndirectArgument() { result = this.asIndirectArgument(_) }
236
237
/** Gets the positional parameter corresponding to this node, if any. */
238
- Parameter asParameter() { result = this.asParameter(0) }
+ Parameter asParameter() {
239
+ exists(int indirectionIndex | result = this.asParameter(indirectionIndex) |
240
+ if result.getUnspecifiedType() instanceof ReferenceType
241
+ then indirectionIndex = 1
242
+ else indirectionIndex = 0
243
+ )
244
+ }
245
246
/**
247
* Gets the uninitialized local variable corresponding to this node, if
0 commit comments