CodeQL queries 1.25
Skip to end of metadata
Go to start of metadata

Finds casts from a floating point type to an integer type.

import csharp

from CastExpr c
where
  c.getExpr().getType() instanceof FloatingPointType and
  c.getType() instanceof IntegralType
select c