Reduce partial definition flow edge redundancy

This commit is contained in:
Pavel Avgustinov
2019-07-10 14:41:50 +01:00
committed by Jonas Jensen
parent bb8eb235e0
commit 1b9a2d3d87
2 changed files with 3 additions and 2 deletions

View File

@@ -173,7 +173,7 @@ private class ArrayContent extends Content, TArrayContent {
predicate storeStep(Node node1, Content f, PostUpdateNode node2) {
exists(FieldAccess fa |
exists(Assignment a |
(a.getRValue() = node1.asExpr() or node1.asExpr() = a) and
node1.asExpr() = a and
a.getLValue() = fa
) and
not fa.getTarget().isStatic() and

View File

@@ -320,7 +320,8 @@ module FlowVar_internal {
BlockVar() { this = TBlockVar(sbb, v) }
override VariableAccess getAnAccess() {
variableAccessInSBB(v, getAReachedBlockVarSBB(this), result)
variableAccessInSBB(v, getAReachedBlockVarSBB(this), result) and
result != sbb
}
override predicate definedByInitialValue(LocalScopeVariable lsv) {