C++: Always show the right-hand side of assignment in paths.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-04-13 01:00:38 +01:00
parent 0bed22178c
commit 2cbc59b7a1
2 changed files with 7 additions and 0 deletions

View File

@@ -27,4 +27,6 @@ module CppDataFlow implements InputSig<Location> {
predicate mayBenefitFromCallContext = Private::mayBenefitFromCallContext/1;
predicate viableImplInCallContext = Private::viableImplInCallContext/2;
predicate neverSkipInPathGraph = Private::neverSkipInPathGraph/1;
}

View File

@@ -1009,6 +1009,11 @@ predicate nodeIsHidden(Node n) {
n instanceof InitialGlobalValue
}
predicate neverSkipInPathGraph(Node n) {
// Always show the right-hand side of assignments in the path graph
nodeHasOperand(n, any(StoreInstruction store).getSourceValueOperand(), _)
}
class LambdaCallKind = Unit;
/** Holds if `creation` is an expression that creates a lambda of kind `kind` for `c`. */