mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
C++: Fix cpp/offset-use-before-range-check performance.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
import cpp
|
||||
|
||||
bindingset[v, before]
|
||||
predicate beforeArrayAccess(Variable v, ArrayExpr access, Expr before) {
|
||||
exists(LogicalAndExpr andexpr |
|
||||
access.getArrayOffset() = v.getAnAccess() and
|
||||
@@ -23,6 +24,7 @@ predicate beforeArrayAccess(Variable v, ArrayExpr access, Expr before) {
|
||||
)
|
||||
}
|
||||
|
||||
bindingset[v, after]
|
||||
predicate afterArrayAccess(Variable v, ArrayExpr access, Expr after) {
|
||||
exists(LogicalAndExpr andexpr |
|
||||
access.getArrayOffset() = v.getAnAccess() and
|
||||
|
||||
Reference in New Issue
Block a user