File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class FieldFlowPropertyProvider extends IRPropertyProvider {
13
13
override string getOperandProperty ( Operand operand , string key ) {
14
14
exists ( PostFieldUpdateNode pfun , Content content |
15
15
key = "store " + content .toString ( ) and
16
- operand = pfun .getPreUpdateNode ( ) .( IndirectOperand ) .getOperand ( ) and
16
+ pfun .getPreUpdateNode ( ) .( IndirectOperand ) .hasOperandAndIndirectionIndex ( operand , _ ) and
17
17
result =
18
18
strictconcat ( string element , Node node |
19
19
storeStep ( node , content , pfun ) and
@@ -25,7 +25,7 @@ class FieldFlowPropertyProvider extends IRPropertyProvider {
25
25
or
26
26
exists ( Node node2 , Content content |
27
27
key = "read " + content .toString ( ) and
28
- operand = node2 .( IndirectOperand ) .getOperand ( ) and
28
+ node2 .( IndirectOperand ) .hasOperandAndIndirectionIndex ( operand , _ ) and
29
29
result =
30
30
strictconcat ( string element , Node node1 |
31
31
readStep ( node1 , content , node2 ) and
Original file line number Diff line number Diff line change @@ -18,9 +18,12 @@ private string stars(int k) {
18
18
}
19
19
20
20
string starsForNode ( Node node ) {
21
- result = stars ( node .( IndirectInstruction ) .getIndirectionIndex ( ) )
22
- or
23
- result = stars ( node .( IndirectOperand ) .getIndirectionIndex ( ) )
21
+ exists ( int indirectionIndex |
22
+ node .( IndirectInstruction ) .hasInstructionAndIndirectionIndex ( _, indirectionIndex ) or
23
+ node .( IndirectOperand ) .hasOperandAndIndirectionIndex ( _, indirectionIndex )
24
+ |
25
+ result = stars ( indirectionIndex )
26
+ )
24
27
or
25
28
not node instanceof IndirectInstruction and
26
29
not node instanceof IndirectOperand and
You can’t perform that action at this time.
0 commit comments