Files
codeql/csharp/ql/examples/snippets/cast_expr.ql
2019-08-02 15:30:32 +02:00

18 lines
340 B
Plaintext

/**
* @id cs/examples/cast-expr
* @name Cast expressions
* @description Finds casts from a floating point type to an integer type.
* @tags cast
* integer
* float
* type
*/
import csharp
from CastExpr c
where
c.getExpr().getType() instanceof FloatingPointType and
c.getType() instanceof IntegralType
select c