File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -51,16 +51,6 @@ private newtype TDefOrUse =
51
51
TExplicitUse ( Operand op ) { isExplicitUse ( op ) } or
52
52
TReturnParamIndirection ( Operand op ) { returnParameterIndirection ( op , _) }
53
53
54
- pragma [ nomagic]
55
- private int getRank ( DefOrUse defOrUse , IRBlock block ) {
56
- defOrUse =
57
- rank [ result ] ( int i , DefOrUse cand |
58
- block .getInstruction ( i ) = toInstruction ( cand )
59
- |
60
- cand order by i
61
- )
62
- }
63
-
64
54
private class DefOrUse extends TDefOrUse {
65
55
/** Gets the instruction associated with this definition, if any. */
66
56
Instruction asDef ( ) { none ( ) }
@@ -75,8 +65,9 @@ private class DefOrUse extends TDefOrUse {
75
65
abstract IRBlock getBlock ( ) ;
76
66
77
67
/** Holds if this definition or use has rank `rank` in block `block`. */
78
- cached
79
- final predicate hasRankInBlock ( IRBlock block , int rnk ) { rnk = getRank ( this , block ) }
68
+ final predicate hasIndexInBlock ( IRBlock block , int index ) {
69
+ block .getInstruction ( index ) = toInstruction ( this )
70
+ }
80
71
81
72
/** Gets the location of this element. */
82
73
abstract Cpp:: Location getLocation ( ) ;
You can’t perform that action at this time.
0 commit comments