Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c87b516

Browse files
committed
C++: Turn IndirectArgumentOutNode into a PartialDefinitionNode
1 parent f491507 commit c87b516

3 files changed

Lines changed: 342 additions & 209 deletions

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ class IndirectReturnNode extends IndirectOperand {
543543
* A node representing the indirection of a value after it
544544
* has been returned from a function.
545545
*/
546-
class IndirectArgumentOutNode extends Node, TIndirectArgumentOutNode, PostUpdateNode {
546+
class IndirectArgumentOutNode extends Node, TIndirectArgumentOutNode, PartialDefinitionNode {
547547
ArgumentOperand operand;
548548
int indirectionIndex;
549549

@@ -577,6 +577,8 @@ class IndirectArgumentOutNode extends Node, TIndirectArgumentOutNode, PostUpdate
577577
}
578578

579579
override Location getLocationImpl() { result = operand.getLocation() }
580+
581+
override Expr getDefinedExpr() { result = operand.getDef().getUnconvertedResultExpression() }
580582
}
581583

582584
pragma[nomagic]

0 commit comments

Comments
 (0)