mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
C++: Better solution.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
import cpp
|
||||
|
||||
bindingset[v, before]
|
||||
pragma[nomagic]
|
||||
predicate beforeArrayAccess(Variable v, ArrayExpr access, Expr before) {
|
||||
exists(LogicalAndExpr andexpr |
|
||||
access.getArrayOffset() = v.getAnAccess() and
|
||||
@@ -24,7 +24,7 @@ predicate beforeArrayAccess(Variable v, ArrayExpr access, Expr before) {
|
||||
)
|
||||
}
|
||||
|
||||
bindingset[v, after]
|
||||
pragma[nomagic]
|
||||
predicate afterArrayAccess(Variable v, ArrayExpr access, Expr after) {
|
||||
exists(LogicalAndExpr andexpr |
|
||||
access.getArrayOffset() = v.getAnAccess() and
|
||||
|
||||
Reference in New Issue
Block a user