Skip to content

Commit 1dae787

Browse files
committed
C++: Drive-by fix suggested by Schack. This now matches the predicate in C#.
1 parent 492e27b commit 1dae787

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,9 +1125,11 @@ class PhiNode extends Definition instanceof SsaImpl::PhiNode {
11251125

11261126
/** An static single assignment (SSA) definition. */
11271127
class Definition extends SsaImpl::Definition {
1128-
// TODO: Include prior definitions of uncertain writes or rename predicate
1129-
// i.e. the disjunct `SsaImpl::uncertainWriteDefinitionInput(this, result)`
1130-
private Definition getAPhiInputOrPriorDefinition() { result = this.(PhiNode).getAnInput() }
1128+
private Definition getAPhiInputOrPriorDefinition() {
1129+
result = this.(PhiNode).getAnInput()
1130+
or
1131+
SsaImpl::uncertainWriteDefinitionInput(this, result)
1132+
}
11311133

11321134
/**
11331135
* Gets a definition that ultimately defines this SSA definition and is

0 commit comments

Comments
 (0)