Files
codeql/docs/language/ql-training-rst/query-examples/cpp/empty-if-cpp.ql

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."