mirror of
https://github.com/github/codeql.git
synced 2026-06-13 08:51:20 +02:00
Cfg: Fold getTryInit into indexed getBody.
This commit is contained in:
@@ -117,15 +117,18 @@ private module Ast implements AstSig<Location> {
|
||||
final private class FinalTryStmt = J::TryStmt;
|
||||
|
||||
class TryStmt extends FinalTryStmt {
|
||||
Stmt getBody() { result = super.getBlock() }
|
||||
Stmt getBody(int index) {
|
||||
result = super.getResource(index)
|
||||
or
|
||||
index = count(super.getAResource()) and
|
||||
result = super.getBlock()
|
||||
}
|
||||
|
||||
CatchClause getCatch(int index) { result = super.getCatchClause(index) }
|
||||
|
||||
Stmt getFinally() { result = super.getFinally() }
|
||||
}
|
||||
|
||||
AstNode getTryInit(TryStmt try, int index) { result = try.getResource(index) }
|
||||
|
||||
final private class FinalCatchClause = J::CatchClause;
|
||||
|
||||
class CatchClause extends FinalCatchClause {
|
||||
|
||||
Reference in New Issue
Block a user