diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h index e084a13995306..d4052ef90de6e 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h @@ -324,8 +324,6 @@ class SMTConstraintManager : public clang::ento::SimpleConstraintManager { // Construct the logical AND of all the constraints if (I != IE) { - std::vector ASTs; - llvm::SMTExprRef Constraint = I++->second; while (I != IE) { Constraint = Solver->mkAnd(Constraint, I++->second); diff --git a/clang/lib/Sema/SemaPPC.cpp b/clang/lib/Sema/SemaPPC.cpp index b6802d6890ed1..9b4d82745f881 100644 --- a/clang/lib/Sema/SemaPPC.cpp +++ b/clang/lib/Sema/SemaPPC.cpp @@ -98,7 +98,6 @@ bool SemaPPC::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, CallExpr *TheCall) { ASTContext &Context = getASTContext(); bool IsTarget64Bit = TI.getTypeWidth(TI.getIntPtrType()) == 64; - llvm::APSInt Result; if (isPPC_64Builtin(BuiltinID) && !IsTarget64Bit) return Diag(TheCall->getBeginLoc(), diag::err_64_bit_builtin_32_bit_tgt) diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index 0ecdbb3ffb89f..c9de36383d334 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -6605,8 +6605,6 @@ bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs( llvm_unreachable("Unexpected Result"); } - SmallVector DeducedArgs(Deduced.begin(), Deduced.end()); - TemplateDeductionResult TDK; runWithSufficientStackSpace(Info.getLocation(), [&] { TDK = ::FinishTemplateArgumentDeduction( diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp index 0f0184c472f36..4ddd11495f534 100644 --- a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp @@ -370,8 +370,6 @@ std::optional isUnsafePtr(const QualType T, bool IsArcEnabled) { std::optional isGetterOfSafePtr(const CXXMethodDecl *M) { assert(M); - std::optional RTC; - if (isa(M)) { const CXXRecordDecl *calleeMethodsClass = M->getParent(); auto className = safeGetName(calleeMethodsClass); diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index f8db8d0bc8343..28b96f2717210 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -3377,8 +3377,6 @@ PathSensitiveBugReporter::generateDiagnosticForConsumerMap( BugReport *exampleReport, ArrayRef> consumers, ArrayRef bugReports) { - std::vector BasicBugReports; - std::vector PathSensitiveBugReports; if (isa(exampleReport)) return BugReporter::generateDiagnosticForConsumerMap(exampleReport, consumers, bugReports); diff --git a/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp b/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp index 95d9df4100bfa..84a9c43d3572e 100644 --- a/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp +++ b/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp @@ -270,7 +270,7 @@ static bool isWithinConstantOverflowBounds(llvm::APSInt I) { assert(!AT.isUnsigned() && "This only works with signed integers!"); - llvm::APSInt Max = AT.getMaxValue() / AT.getValue(4), Min = -Max; + llvm::APSInt Max = AT.getMaxValue() / AT.getValue(4); return (I <= Max) && (I >= -Max); } diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp index 2032b13726c45..c1febaf40bf19 100644 --- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp +++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp @@ -703,7 +703,6 @@ TEST(ParseFixedCompilationDatabase, HandlesArgv0) { Database->getCompileCommands("source"); ASSERT_EQ(1ul, Result.size()); ASSERT_EQ(".", Result[0].Directory); - std::vector Expected; ASSERT_THAT(Result[0].CommandLine, ElementsAre(EndsWith("clang-tool"), "source")); EXPECT_EQ(2, Argc);