Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c615ec

Browse files
authored
Merge pull request #4292 from MathiasVP/mathiasvp/cache-simpleLocalFlowStep
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2 parents 3ef6e8a + c6ff805 commit 8c615ec

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())
@@ -606,7 +607,6 @@ private predicate simpleOperandLocalFlowStep(Instruction iFrom, Operand opTo) {
606607
)
607608
}
608609

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

0 commit comments

Comments
 (0)