Files
codeql/csharp/ql/test/library-tests/statements/LocalConstDecl3.ql
2018-12-20 10:19:59 +01:00

15 lines
367 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