@@ -1640,8 +1640,11 @@ predicate localInstructionFlow(Instruction e1, Instruction e2) {
16401640 localFlow ( instructionNode ( e1 ) , instructionNode ( e2 ) )
16411641}
16421642
1643+ /**
1644+ * INTERNAL: Do not use.
1645+ */
16431646cached
1644- private module ExprFlowCached {
1647+ module ExprFlowCached {
16451648 /**
16461649 * Holds if `n` is an indirect operand of a `PointerArithmeticInstruction`, and
16471650 * `e` is the result of loading from the `PointerArithmeticInstruction`.
@@ -1692,7 +1695,8 @@ private module ExprFlowCached {
16921695 * `x[i]` steps to the expression `x[i - 1]` without traversing the
16931696 * entire chain.
16941697 */
1695- private Expr asExpr ( Node n ) {
1698+ cached
1699+ Expr asExprInternal ( Node n ) {
16961700 isIndirectBaseOfArrayAccess ( n , result )
16971701 or
16981702 not isIndirectBaseOfArrayAccess ( n , _) and
@@ -1704,7 +1708,7 @@ private module ExprFlowCached {
17041708 * dataflow step.
17051709 */
17061710 private predicate localStepFromNonExpr ( Node n1 , Node n2 ) {
1707- not exists ( asExpr ( n1 ) ) and
1711+ not exists ( asExprInternal ( n1 ) ) and
17081712 localFlowStep ( n1 , n2 )
17091713 }
17101714
@@ -1715,7 +1719,7 @@ private module ExprFlowCached {
17151719 pragma [ nomagic]
17161720 private predicate localStepsToExpr ( Node n1 , Node n2 , Expr e2 ) {
17171721 localStepFromNonExpr * ( n1 , n2 ) and
1718- e2 = asExpr ( n2 )
1722+ e2 = asExprInternal ( n2 )
17191723 }
17201724
17211725 /**
@@ -1726,7 +1730,7 @@ private module ExprFlowCached {
17261730 exists ( Node mid |
17271731 localFlowStep ( n1 , mid ) and
17281732 localStepsToExpr ( mid , n2 , e2 ) and
1729- e1 = asExpr ( n1 )
1733+ e1 = asExprInternal ( n1 )
17301734 )
17311735 }
17321736
0 commit comments