Skip to content

Commit 78eb8ef

Browse files
helper to check statements are only scope content
1 parent 9960bc6 commit 78eb8ef

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

python/ql/src/Statements/StatementNoEffect.ql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ private string special_method() {
9595
result = any(BinaryExpr b).getOp().getSpecialMethodName()
9696
}
9797

98+
private predicate is_only_scope_statement(Stmt s) {
99+
forex(Stmt scope_stmt | scope_stmt = s.getScope().getAStmt() | scope_stmt = s)
100+
}
101+
98102
ClassDef getAProtocolDef() {
99103
exists(Expr e |
100104
e =

0 commit comments

Comments
 (0)