Skip to content

Commit 82f0404

Browse files
committed
Fixup of implementation to propagate call completion.
1 parent c0dfbc2 commit 82f0404

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,10 @@ module Expressions {
542542
}
543543

544544
final override predicate last(AstNode last, Completion c) {
545+
// The last ast node is the last out writeaccess.
546+
// Completion from the call itself is propagated (required for eg. conditions).
545547
last = this.getLastOutAccess() and
546-
c.isValidFor(last)
548+
c.isValidFor(this)
547549
}
548550

549551
final override predicate succ(AstNode pred, AstNode succ, Completion c) {

0 commit comments

Comments
 (0)