Files
codeql/csharp/ql/test/library-tests/statements/LocalConstDecl2.ql
2018-08-02 17:53:23 +01:00

14 lines
397 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().getType() instanceof IntType
and e.getVariable().getValue() = "25"
select m, s, e