CodeQL queries 1.23

Skip to end of metadata
Go to start of metadata

Finds 'if' statements where the 'then' branch is an empty block statement.

import csharp

from IfStmt i
where i.getThen().(BlockStmt).isEmpty()
select i