Files
codeql/cpp/ql/examples/returnstatement.ql
2019-07-26 17:47:11 +02:00

14 lines
234 B
Plaintext

/**
* @name Return statements
* @description Finds return statements that return `0`
* @tags return
* statement
* literal
*/
import cpp
from ReturnStmt r
where r.getExpr().(Literal).getValue().toInt() = 0
select r