File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
cpp/ql/src/semmle/code/cpp/ir/dataflow Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,7 @@ private predicate predictable(Expr expr) {
2222
2323// TODO: remove when `predictable` has an `Instruction` parameter instead of `Expr`.
2424private predicate predictableInstruction ( Instruction instr ) {
25- exists ( DataFlow:: Node node |
26- node .asInstruction ( ) = instr and
27- predictable ( node .asExpr ( ) )
28- )
25+ predictable ( DataFlow:: instructionNode ( instr ) .asExpr ( ) )
2926}
3027
3128private class DefaultTaintTrackingCfg extends DataFlow:: Configuration {
Original file line number Diff line number Diff line change @@ -156,6 +156,11 @@ abstract class PostUpdateNode extends Node {
156156 abstract Node getPreUpdateNode ( ) ;
157157}
158158
159+ /**
160+ * Gets the node corresponding to `instr`.
161+ */
162+ Node instructionNode ( Instruction instr ) { result .asInstruction ( ) = instr }
163+
159164/**
160165 * Gets a `Node` corresponding to `e` or any of its conversions. There is no
161166 * result if `e` is a `Conversion`.
You can’t perform that action at this time.
0 commit comments