mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
13 lines
333 B
Plaintext
13 lines
333 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
|
|
|