mirror of
https://github.com/github/codeql.git
synced 2026-02-28 12:53:49 +01:00
13 lines
364 B
Plaintext
13 lines
364 B
Plaintext
/**
|
|
* @name Test for local variable declaration statement
|
|
*/
|
|
import csharp
|
|
|
|
from Method m, LocalConstantDeclStmt s, LocalConstantDeclExpr e
|
|
where m.getName() = "MainLocalConstDecl"
|
|
and s.getEnclosingCallable() = m
|
|
and s.getAVariableDeclExpr() = e
|
|
and e.getVariable().getName() = "r"
|
|
and e.getVariable().getInitializer() instanceof AddExpr
|
|
select m, s, e
|