@@ -190,9 +190,8 @@ class ASTScopeImpl : public ASTAllocated<ASTScopeImpl> {
190190 return parentAndWasExpanded.getPointer ();
191191 }
192192
193- const Children &getChildren () const { return storedChildren; }
194-
195193public:
194+ const Children &getChildren () const { return storedChildren; }
196195 void addChild (ASTScopeImpl *child, ASTContext &);
197196
198197public:
@@ -235,7 +234,6 @@ class ASTScopeImpl : public ASTAllocated<ASTScopeImpl> {
235234 ScopeKind getKind () const { return kind; }
236235
237236 virtual NullablePtr<AbstractClosureExpr> getClosureIfClosureScope () const ;
238- virtual NullablePtr<const BraceStmtScope> getAsBraceStmtScope () const ;
239237 ASTContext &getASTContext () const ;
240238 NullablePtr<Decl> getDeclIfAny () const ;
241239 NullablePtr<Stmt> getStmtIfAny () const ;
@@ -312,12 +310,6 @@ class ASTScopeImpl : public ASTAllocated<ASTScopeImpl> {
312310 // / compact scope tree in the debug info.
313311 virtual bool ignoreInDebugInfo () const { return false ; }
314312
315- // / If this scope node represents a potential catch node, return body the
316- // / AST node describing the catch (a function, closure, or do...catch) and
317- // / the node of it's "body", i.e., the brace statement from which errors
318- // / thrown will be caught by that node.
319- virtual std::pair<CatchNode, const BraceStmtScope *> getCatchNodeBody () const ;
320-
321313#pragma mark - - lookup- starting point
322314private:
323315 static const ASTScopeImpl *findStartingScopeForLookup (SourceFile *,
@@ -896,8 +888,6 @@ class FunctionBodyScope : public ASTScopeImpl {
896888 Decl *getDecl () const { return decl; }
897889 bool ignoreInDebugInfo () const override { return true ; }
898890
899- std::pair<CatchNode, const BraceStmtScope *> getCatchNodeBody () const override ;
900-
901891protected:
902892 bool lookupLocalsOrMembers (DeclConsumer) const override ;
903893
@@ -1174,8 +1164,6 @@ class ClosureParametersScope final : public ASTScopeImpl {
11741164 NullablePtr<AbstractClosureExpr> getClosureIfClosureScope () const override {
11751165 return closureExpr;
11761166 }
1177- std::pair<CatchNode, const BraceStmtScope *> getCatchNodeBody () const override ;
1178-
11791167 Expr *getExpr () const { return closureExpr; }
11801168 bool ignoreInDebugInfo () const override { return true ; }
11811169
@@ -1610,8 +1598,6 @@ class DoCatchStmtScope final : public AbstractStmtScope {
16101598 void expandAScopeThatDoesNotCreateANewInsertionPoint (ScopeCreator &);
16111599
16121600public:
1613- std::pair<CatchNode, const BraceStmtScope *> getCatchNodeBody () const override ;
1614-
16151601 Stmt *getStmt () const override { return stmt; }
16161602
16171603 static bool classof (const ASTScopeImpl *scope) {
@@ -1848,9 +1834,7 @@ class BraceStmtScope final : public AbstractStmtScope {
18481834 getSourceRangeOfThisASTNode (bool omitAssertions = false ) const override ;
18491835
18501836 NullablePtr<AbstractClosureExpr> parentClosureIfAny () const ; // public??
1851- Stmt *getStmt () const override { return stmt; }
1852-
1853- NullablePtr<const BraceStmtScope> getAsBraceStmtScope () const override ;
1837+ BraceStmt *getStmt () const override { return stmt; }
18541838
18551839protected:
18561840 bool lookupLocalsOrMembers (DeclConsumer) const override ;
0 commit comments