From f2a6fe601a862b4520266cd660ae4a130886ef33 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 14 Mar 2023 11:31:45 -0400 Subject: [PATCH] Remove an unused private data member; NFC --- clang/lib/Sema/SemaStmt.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index eda4e01f8f0f0..3e0b3c2b953f4 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -4401,7 +4401,6 @@ template <> struct DenseMapInfo { namespace { class CatchTypePublicBases { - ASTContext &Ctx; const llvm::DenseMap &TypesToCheck; CXXCatchStmt *FoundHandler; @@ -4409,10 +4408,9 @@ class CatchTypePublicBases { QualType TestAgainstType; public: - CatchTypePublicBases(ASTContext &Ctx, - const llvm::DenseMap &T, + CatchTypePublicBases(const llvm::DenseMap &T, QualType QT) - : Ctx(Ctx), TypesToCheck(T), FoundHandler(nullptr), TestAgainstType(QT) {} + : TypesToCheck(T), FoundHandler(nullptr), TestAgainstType(QT) {} CXXCatchStmt *getFoundHandler() const { return FoundHandler; } QualType getFoundHandlerType() const { return FoundHandlerType; } @@ -4511,7 +4509,7 @@ StmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, // as the original type. CXXBasePaths Paths; Paths.setOrigin(RD); - CatchTypePublicBases CTPB(Context, HandledBaseTypes, + CatchTypePublicBases CTPB(HandledBaseTypes, H->getCaughtType().getCanonicalType()); if (RD->lookupInBases(CTPB, Paths)) { const CXXCatchStmt *Problem = CTPB.getFoundHandler();