mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
14 lines
335 B
Plaintext
14 lines
335 B
Plaintext
/**
|
|
* @name Test for unchecked expression
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from Method m, UncheckedExpr e
|
|
where
|
|
m.hasName("MainChecked") and
|
|
e.getEnclosingCallable() = m and
|
|
e.getExpr().(AddExpr).getLeftOperand().(FieldAccess).getTarget().hasName("f") and
|
|
e.getExpr().(AddExpr).getRightOperand().(IntLiteral).getValue() = "20"
|
|
select m, e
|