Skip to content

Commit 1812a43

Browse files
[clang] Remove unused local variables (NFC) (#138468)
1 parent b807a2b commit 1812a43

File tree

7 files changed

+1
-11
lines changed

7 files changed

+1
-11
lines changed

clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,6 @@ class SMTConstraintManager : public clang::ento::SimpleConstraintManager {
324324

325325
// Construct the logical AND of all the constraints
326326
if (I != IE) {
327-
std::vector<llvm::SMTExprRef> ASTs;
328-
329327
llvm::SMTExprRef Constraint = I++->second;
330328
while (I != IE) {
331329
Constraint = Solver->mkAnd(Constraint, I++->second);

clang/lib/Sema/SemaPPC.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ bool SemaPPC::CheckPPCBuiltinFunctionCall(const TargetInfo &TI,
9898
CallExpr *TheCall) {
9999
ASTContext &Context = getASTContext();
100100
bool IsTarget64Bit = TI.getTypeWidth(TI.getIntPtrType()) == 64;
101-
llvm::APSInt Result;
102101

103102
if (isPPC_64Builtin(BuiltinID) && !IsTarget64Bit)
104103
return Diag(TheCall->getBeginLoc(), diag::err_64_bit_builtin_32_bit_tgt)

clang/lib/Sema/SemaTemplateDeduction.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6605,8 +6605,6 @@ bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(
66056605
llvm_unreachable("Unexpected Result");
66066606
}
66076607

6608-
SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
6609-
66106608
TemplateDeductionResult TDK;
66116609
runWithSufficientStackSpace(Info.getLocation(), [&] {
66126610
TDK = ::FinishTemplateArgumentDeduction(

clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,6 @@ std::optional<bool> isUnsafePtr(const QualType T, bool IsArcEnabled) {
370370
std::optional<bool> isGetterOfSafePtr(const CXXMethodDecl *M) {
371371
assert(M);
372372

373-
std::optional<RetainTypeChecker> RTC;
374-
375373
if (isa<CXXMethodDecl>(M)) {
376374
const CXXRecordDecl *calleeMethodsClass = M->getParent();
377375
auto className = safeGetName(calleeMethodsClass);

clang/lib/StaticAnalyzer/Core/BugReporter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3377,8 +3377,6 @@ PathSensitiveBugReporter::generateDiagnosticForConsumerMap(
33773377
BugReport *exampleReport,
33783378
ArrayRef<std::unique_ptr<PathDiagnosticConsumer>> consumers,
33793379
ArrayRef<BugReport *> bugReports) {
3380-
std::vector<BasicBugReport *> BasicBugReports;
3381-
std::vector<PathSensitiveBugReport *> PathSensitiveBugReports;
33823380
if (isa<BasicBugReport>(exampleReport))
33833381
return BugReporter::generateDiagnosticForConsumerMap(exampleReport,
33843382
consumers, bugReports);

clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static bool isWithinConstantOverflowBounds(llvm::APSInt I) {
270270
assert(!AT.isUnsigned() &&
271271
"This only works with signed integers!");
272272

273-
llvm::APSInt Max = AT.getMaxValue() / AT.getValue(4), Min = -Max;
273+
llvm::APSInt Max = AT.getMaxValue() / AT.getValue(4);
274274
return (I <= Max) && (I >= -Max);
275275
}
276276

clang/unittests/Tooling/CompilationDatabaseTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ TEST(ParseFixedCompilationDatabase, HandlesArgv0) {
703703
Database->getCompileCommands("source");
704704
ASSERT_EQ(1ul, Result.size());
705705
ASSERT_EQ(".", Result[0].Directory);
706-
std::vector<std::string> Expected;
707706
ASSERT_THAT(Result[0].CommandLine,
708707
ElementsAre(EndsWith("clang-tool"), "source"));
709708
EXPECT_EQ(2, Argc);

0 commit comments

Comments
 (0)