mirror of
https://github.com/github/codeql.git
synced 2026-02-17 07:23:42 +01:00
10 lines
416 B
Plaintext
10 lines
416 B
Plaintext
import cpp
|
|
|
|
from AnalysedExpr a, LocalScopeVariable v, string isNullCheck, string isValidCheck
|
|
where
|
|
a.getParent() instanceof IfStmt and
|
|
v.getAnAccess().getEnclosingStmt() = a.getParent() and
|
|
(if a.isNullCheck(v) then isNullCheck = "is null" else isNullCheck = "is not null") and
|
|
(if a.isValidCheck(v) then isValidCheck = "is valid" else isValidCheck = "is not valid")
|
|
select a, v, isNullCheck, isValidCheck
|