Skip to content

Commit 24cb36a

Browse files
author
Robert Marsh
committed
C++: constrain indirect out node to constructors
1 parent 25a1148 commit 24cb36a

2 files changed

Lines changed: 102 additions & 101 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ private predicate exprNodeShouldBeIndirectOperand(IndirectOperand node, Expr e,
740740

741741
private predicate exprNodeShouldBeIndirectOutNode(IndirectArgumentOutNode node, Expr e) {
742742
exists(CallInstruction call |
743+
call.getStaticCallTarget() instanceof Constructor and
743744
e = call.getConvertedResultExpression() and
744745
call.getThisArgumentOperand() = node.getAddressOperand()
745746
)

0 commit comments

Comments
 (0)