mirror of
https://github.com/github/codeql.git
synced 2026-02-28 04:43:42 +01:00
15 lines
455 B
Plaintext
15 lines
455 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() = "pi"
|
|
and e.getVariable().getType() instanceof FloatType
|
|
and e.getInitializer() instanceof FloatLiteral
|
|
and e.getVariable().getValue() = "3.141593"
|
|
select m, s, e
|