Files
codeql/docs/language/ql-training/query-examples/cpp/empty-if-cpp.ql
2019-09-05 08:40:36 +01:00

7 lines
152 B
Plaintext

import cpp
from IfStmt ifstmt, Block block
where
block = ifstmt.getThen() and
block.isEmpty()
select ifstmt, "This if-statement is redundant."