File tree Expand file tree Collapse file tree 2 files changed +0
-26
lines changed Expand file tree Collapse file tree 2 files changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -1133,9 +1133,6 @@ class AbstractPatternEntryScope : public ASTScopeImpl {
11331133};
11341134
11351135class PatternEntryDeclScope final : public AbstractPatternEntryScope {
1136- const Expr *initWhenLastExpanded;
1137- unsigned varCountWhenLastExpanded = 0 ;
1138-
11391136public:
11401137 PatternEntryDeclScope (PatternBindingDecl *pbDecl, unsigned entryIndex,
11411138 DeclVisibilityKind vis)
@@ -1144,8 +1141,6 @@ class PatternEntryDeclScope final : public AbstractPatternEntryScope {
11441141
11451142protected:
11461143 ASTScopeImpl *expandSpecifically (ScopeCreator &scopeCreator) override ;
1147- void beCurrent () override ;
1148- bool isCurrentIfWasExpanded () const override ;
11491144
11501145private:
11511146 AnnotatedInsertionPoint
Original file line number Diff line number Diff line change @@ -1695,27 +1695,6 @@ bool ASTSourceFileScope::isCurrentIfWasExpanded() const {
16951695 return SF->getTopLevelDecls ().size () == numberOfDeclsAlreadySeen;
16961696}
16971697
1698- // Try to avoid the work of counting
1699- static const bool assumeVarsDoNotGetAdded = true ;
1700-
1701- void PatternEntryDeclScope::beCurrent () {
1702- initWhenLastExpanded = getPatternEntry ().getOriginalInit ();
1703- if (assumeVarsDoNotGetAdded && varCountWhenLastExpanded)
1704- return ;
1705- varCountWhenLastExpanded = getPatternEntry ().getNumBoundVariables ();
1706- }
1707- bool PatternEntryDeclScope::isCurrentIfWasExpanded () const {
1708- if (initWhenLastExpanded != getPatternEntry ().getOriginalInit ())
1709- return false ;
1710- if (assumeVarsDoNotGetAdded && varCountWhenLastExpanded) {
1711- ASTScopeAssert (varCountWhenLastExpanded ==
1712- getPatternEntry ().getNumBoundVariables (),
1713- " Vars were not supposed to be added to a pattern entry." );
1714- return true ;
1715- }
1716- return getPatternEntry ().getNumBoundVariables () == varCountWhenLastExpanded;
1717- }
1718-
17191698#pragma mark getParentOfASTAncestorScopesToBeRescued
17201699NullablePtr<ASTScopeImpl>
17211700ASTScopeImpl::getParentOfASTAncestorScopesToBeRescued () {
You can’t perform that action at this time.
0 commit comments