Skip to content

Commit d1c7b74

Browse files
committed
Remove caching for nested name specifiers
Signed-off-by: Roberto Raggi <[email protected]>
1 parent ca6f533 commit d1c7b74

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/parser/cxx/parser.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,15 +1650,6 @@ auto Parser::parse_nested_name_specifier(NestedNameSpecifierAST*& yyast)
16501650
return true;
16511651
};
16521652

1653-
const auto start = currentLocation();
1654-
1655-
if (auto entry = nested_name_specifiers_.get(start)) {
1656-
auto [cursor, ast, parsed, hit] = *entry;
1657-
rewind(cursor);
1658-
yyast = ast;
1659-
return parsed;
1660-
}
1661-
16621653
yyast = nullptr;
16631654

16641655
if (SourceLocation scopeLoc; match(TokenKind::T_COLON_COLON, scopeLoc)) {
@@ -1680,8 +1671,6 @@ auto Parser::parse_nested_name_specifier(NestedNameSpecifierAST*& yyast)
16801671

16811672
const auto parsed = yyast != nullptr;
16821673

1683-
nested_name_specifiers_.set(start, currentLocation(), yyast, parsed);
1684-
16851674
return parsed;
16861675
}
16871676

src/parser/cxx/parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,6 @@ class Parser final {
972972
std::deque<const_iterator> queue_;
973973
};
974974

975-
CachedAST<NestedNameSpecifierAST> nested_name_specifiers_;
976975
CachedAST<ParameterDeclarationClauseAST> parameter_declaration_clauses_;
977976
CachedAST<TemplateArgumentAST> template_arguments_;
978977

0 commit comments

Comments
 (0)