Skip to content

Commit 8630630

Browse files
committed
C++: Use 'asDefinition' instead of checking for a 'Store' instruction.
1 parent f3a5ce5 commit 8630630

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,9 @@ predicate nodeIsHidden(Node n) {
10111011

10121012
predicate neverSkipInPathGraph(Node n) {
10131013
// Always show the right-hand side of assignments in the path graph
1014-
nodeHasOperand(n, any(StoreInstruction store).getSourceValueOperand(), _)
1014+
exists(n.asDefinition())
1015+
or
1016+
exists(n.asIndirectDefinition())
10151017
}
10161018

10171019
class LambdaCallKind = Unit;

0 commit comments

Comments
 (0)