mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
15 lines
358 B
Plaintext
15 lines
358 B
Plaintext
/**
|
|
* @name Test for local variable declaration statement
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from Method m, LocalVariableDeclStmt s, LocalVariableDeclExpr e
|
|
where
|
|
m.getName() = "MainLocalVarDecl" and
|
|
s.getEnclosingCallable() = m and
|
|
s.getAVariableDeclExpr() = e and
|
|
e.getVariable().getName() = "a" and
|
|
e.getVariable().getType() instanceof IntType
|
|
select m, s, e
|