diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index 78b74acc3789d..cecdb7b2dda55 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -2429,7 +2429,7 @@ bool Compiler::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *E) { // and the RHS is our SubExpr. for (size_t I = 0; I != Size; ++I) { ArrayIndexScope IndexScope(this, I); - BlockScope BS(this); + LocalScope BS(this); if (!this->visitArrayElemInit(I, SubExpr, SubExprT)) return false; @@ -4140,7 +4140,7 @@ bool Compiler::VisitCXXStdInitializerListExpr( template bool Compiler::VisitStmtExpr(const StmtExpr *E) { - BlockScope BS(this); + LocalScope BS(this); StmtExprScope SS(this); const CompoundStmt *CS = E->getSubStmt(); @@ -5111,7 +5111,7 @@ bool Compiler::VisitCallExpr(const CallExpr *E) { } } - BlockScope CallScope(this, ScopeKind::Call); + LocalScope CallScope(this, ScopeKind::Call); QualType ReturnType = E->getCallReturnType(Ctx.getASTContext()); OptPrimType T = classify(ReturnType); @@ -5475,7 +5475,7 @@ template bool Compiler::visitStmt(const Stmt *S) { template bool Compiler::visitCompoundStmt(const CompoundStmt *S) { - BlockScope Scope(this); + LocalScope Scope(this); for (const auto *InnerStmt : S->body()) if (!visitStmt(InnerStmt)) return false; @@ -6211,7 +6211,7 @@ bool Compiler::compileConstructor(const CXXConstructorDecl *Ctor) { InitLinkScope InitScope(this, InitLink::This()); for (const auto *Init : Ctor->inits()) { // Scope needed for the initializers. - BlockScope Scope(this); + LocalScope Scope(this); const Expr *InitExpr = Init->getInit(); if (const FieldDecl *Member = Init->getMember()) { diff --git a/clang/lib/AST/ByteCode/Compiler.h b/clang/lib/AST/ByteCode/Compiler.h index 5f392964c076a..09599b3547888 100644 --- a/clang/lib/AST/ByteCode/Compiler.h +++ b/clang/lib/AST/ByteCode/Compiler.h @@ -624,14 +624,6 @@ template class LocalScope : public VariableScope { UnsignedOrNone Idx = std::nullopt; }; -/// Scope for storage declared in a compound statement. -// FIXME: Remove? -template class BlockScope final : public LocalScope { -public: - BlockScope(Compiler *Ctx, ScopeKind Kind = ScopeKind::Block) - : LocalScope(Ctx, Kind) {} -}; - template class ArrayIndexScope final { public: ArrayIndexScope(Compiler *Ctx, uint64_t Index) : Ctx(Ctx) {