Skip to content

Commit 2cbc59b

Browse files
committed
C++: Always show the right-hand side of assignment in paths.
1 parent 0bed221 commit 2cbc59b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ module CppDataFlow implements InputSig<Location> {
2727
predicate mayBenefitFromCallContext = Private::mayBenefitFromCallContext/1;
2828

2929
predicate viableImplInCallContext = Private::viableImplInCallContext/2;
30+
31+
predicate neverSkipInPathGraph = Private::neverSkipInPathGraph/1;
3032
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,11 @@ predicate nodeIsHidden(Node n) {
10091009
n instanceof InitialGlobalValue
10101010
}
10111011

1012+
predicate neverSkipInPathGraph(Node n) {
1013+
// Always show the right-hand side of assignments in the path graph
1014+
nodeHasOperand(n, any(StoreInstruction store).getSourceValueOperand(), _)
1015+
}
1016+
10121017
class LambdaCallKind = Unit;
10131018

10141019
/** Holds if `creation` is an expression that creates a lambda of kind `kind` for `c`. */

0 commit comments

Comments
 (0)