C++: constrain indirect out node to constructors

This commit is contained in:
Robert Marsh
2022-10-27 11:48:17 -04:00
parent 25a1148e04
commit 24cb36a1e2
2 changed files with 102 additions and 101 deletions

View File

@@ -740,6 +740,7 @@ private predicate exprNodeShouldBeIndirectOperand(IndirectOperand node, Expr e,
private predicate exprNodeShouldBeIndirectOutNode(IndirectArgumentOutNode node, Expr e) {
exists(CallInstruction call |
call.getStaticCallTarget() instanceof Constructor and
e = call.getConvertedResultExpression() and
call.getThisArgumentOperand() = node.getAddressOperand()
)