Skip to content

Commit 60e3fee

Browse files
committed
C++: Add a 'hasInputFromBlock' predicate.
1 parent f55ace8 commit 60e3fee

File tree

1 file changed

+5
-1
lines changed
  • cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,11 @@ predicate ssaFlow(Node nodeFrom, Node nodeTo) {
11261126
*/
11271127
class PhiNode extends Definition instanceof SsaImpl::PhiNode {
11281128
/** Gets a definition that is an input to this phi node. */
1129-
final Definition getAnInput() { phiHasInputFromBlock(this, result, _) }
1129+
final Definition getAnInput() { this.hasInputFromBlock(result, _) }
1130+
1131+
final predicate hasInputFromBlock(Definition input, IRBlock bb) {
1132+
phiHasInputFromBlock(this, input, bb)
1133+
}
11301134
}
11311135

11321136
/** An static single assignment (SSA) definition. */

0 commit comments

Comments
 (0)