Skip to content

Commit 535c8cc

Browse files
MathiasVPigfoo
authored andcommitted
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
1 parent 795bf0d commit 535c8cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ predicate localFlowStep(Node nodeFrom, Node nodeTo) { simpleLocalFlowStep(nodeFr
545545
* This is the local flow predicate that's used as a building block in global
546546
* data flow. It may have less flow than the `localFlowStep` predicate.
547547
*/
548+
cached
548549
predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) {
549550
// Operand -> Instruction flow
550551
simpleInstructionLocalFlowStep(nodeFrom.asOperand(), nodeTo.asInstruction())
@@ -605,7 +606,6 @@ private predicate simpleOperandLocalFlowStep(Instruction iFrom, Operand opTo) {
605606
)
606607
}
607608

608-
cached
609609
private predicate simpleInstructionLocalFlowStep(Operand opFrom, Instruction iTo) {
610610
iTo.(CopyInstruction).getSourceValueOperand() = opFrom
611611
or

0 commit comments

Comments
 (0)