Skip to content

Commit 376d4e0

Browse files
committed
Ruby: Cache some barrier guard predicates
1 parent 5deb16e commit 376d4e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ruby/ql/lib/codeql/ruby/dataflow/BarrierGuards.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ private import codeql.ruby.ast.internal.Constant
99
private import codeql.ruby.InclusionTests
1010
private import codeql.ruby.ast.internal.Literal
1111

12+
cached
1213
private predicate stringConstCompare(CfgNodes::AstCfgNode guard, CfgNode testedNode, boolean branch) {
1314
exists(CfgNodes::ExprNodes::ComparisonOperationCfgNode c |
1415
c = guard and
@@ -102,6 +103,7 @@ deprecated class StringConstCompare extends DataFlow::BarrierGuard,
102103
}
103104
}
104105

106+
cached
105107
private predicate stringConstArrayInclusionCall(
106108
CfgNodes::AstCfgNode guard, CfgNode testedNode, boolean branch
107109
) {

0 commit comments

Comments
 (0)