Skip to content

Commit d733264

Browse files
committed
C++: Fix DefinitionByReferenceNode.toString
This predicate now has a value also for calls to function pointers.
1 parent 108d517 commit d733264

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ class DefinitionByReferenceNode extends InstructionNode {
246246
result =
247247
instr.getPrimaryInstruction().(CallInstruction).getStaticCallTarget().getName() +
248248
" output argument"
249+
or
250+
not exists(instr.getPrimaryInstruction().(CallInstruction).getStaticCallTarget()) and
251+
result = "output argument"
249252
}
250253
}
251254

0 commit comments

Comments
 (0)