Files
codeql/go/ql/examples/snippets/constant.ql
2022-05-20 10:07:19 -07:00

15 lines
276 B
Plaintext

/**
* @name Compile-time constant
* @description Finds compile-time constants with value zero.
* @id go/examples/zeroconstant
* @tags expression
* numeric value
* constant
*/
import go
from DataFlow::Node zero
where zero.getNumericValue() = 0
select zero