Skip to content

Commit c42892a

Browse files
committed
Reapply "Unified: Simplify callableGetBody."
This reverts commit 4a60ad0.
1 parent e36aa9f commit c42892a

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,7 @@ module Ast implements AstSig<Location> {
4949
Callable() { this.fromSource() }
5050
}
5151

52-
AstNode callableGetBody(Callable c) {
53-
result = c.(AccessorDeclaration).getBody() or
54-
result = c.(ConstructorDeclaration).getBody() or
55-
result = c.(DestructorDeclaration).getBody() or
56-
result = c.(FunctionDeclaration).getBody() or
57-
result = c.(FunctionExpr).getBody() or
58-
result = c.(InitializerDeclaration).getBody() or
59-
result = c.(TopLevel).getBody()
60-
}
52+
AstNode callableGetBody(Callable c) { result = c.getBody() }
6153

6254
class Parameter extends U::Parameter {
6355
Expr getDefaultValue() { result = super.getDefault() }

0 commit comments

Comments
 (0)