File tree Expand file tree Collapse file tree
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class FieldFlowPropertyProvider extends IRPropertyProvider {
1313 override string getOperandProperty ( Operand operand , string key ) {
1414 exists ( PostFieldUpdateNode pfun , Content content |
1515 key = "store " + content .toString ( ) and
16- operand = pfun .getPreUpdateNode ( ) .( IndirectOperand ) .getOperand ( ) and
16+ pfun .getPreUpdateNode ( ) .( IndirectOperand ) .hasOperandAndIndirectionIndex ( operand , _ ) and
1717 result =
1818 strictconcat ( string element , Node node |
1919 storeStep ( node , content , pfun ) and
@@ -25,7 +25,7 @@ class FieldFlowPropertyProvider extends IRPropertyProvider {
2525 or
2626 exists ( Node node2 , Content content |
2727 key = "read " + content .toString ( ) and
28- operand = node2 .( IndirectOperand ) .getOperand ( ) and
28+ node2 .( IndirectOperand ) .hasOperandAndIndirectionIndex ( operand , _ ) and
2929 result =
3030 strictconcat ( string element , Node node1 |
3131 readStep ( node1 , content , node2 ) and
Original file line number Diff line number Diff line change @@ -18,9 +18,12 @@ private string stars(int k) {
1818}
1919
2020string 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+ )
2427 or
2528 not node instanceof IndirectInstruction and
2629 not node instanceof IndirectOperand and
You can’t perform that action at this time.
0 commit comments