Skip to content

Commit 4b6762b

Browse files
[clang-tools-extra] Remove unused local variables (NFC) (llvm#139382)
1 parent 369891b commit 4b6762b

File tree

5 files changed

+0
-7
lines changed

5 files changed

+0
-7
lines changed

clang-tools-extra/clangd/DumpAST.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ class DumpVisitor : public RecursiveASTVisitor<DumpVisitor> {
124124
return Result;
125125
}
126126
std::string getKind(const TypeLoc &TL) {
127-
std::string Result;
128127
if (TL.getTypeLocClass() == TypeLoc::Qualified)
129128
return "Qualified";
130129
return TL.getType()->getTypeClassName();

clang-tools-extra/clangd/unittests/SerializationTests.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ TEST(SerializationTest, NoCrashOnBadStringTableSize) {
433433
std::string CorruptStri =
434434
(llvm::fromHex("ffffffff") + Stri->Data.drop_front(4)).str();
435435
Stri->Data = CorruptStri;
436-
std::string FileDigest = llvm::fromHex("EED8F5EAF25C453C");
437436

438437
// Try to crash rather than hang on large allocation.
439438
ScopedMemoryLimit MemLimit(1000 * 1024 * 1024); // 1GB

clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ mapInputsToAbsPaths(clang::tooling::CompilationDatabase &CDB,
344344
}
345345
for (const auto &Cmd : Cmds) {
346346
llvm::SmallString<256> CDBPath(Cmd.Filename);
347-
std::string Directory(Cmd.Directory);
348347
llvm::sys::fs::make_absolute(Cmd.Directory, CDBPath);
349348
CDBToAbsPaths[std::string(CDBPath)] = std::string(AbsPath);
350349
}

clang-tools-extra/modularize/Modularize.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,6 @@ getModularizeArgumentsAdjuster(DependencyMap &Dependencies) {
360360
if (int Count = FileDependents.size()) {
361361
for (int Index = 0; Index < Count; ++Index) {
362362
NewArgs.push_back("-include");
363-
std::string File(std::string("\"") + FileDependents[Index] +
364-
std::string("\""));
365363
NewArgs.push_back(FileDependents[Index]);
366364
}
367365
}

clang-tools-extra/modularize/PreprocessorTracker.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ static std::string getMacroUnexpandedString(clang::SourceRange Range,
381381
clang::SourceLocation BeginLoc(Range.getBegin());
382382
const char *BeginPtr = PP.getSourceManager().getCharacterData(BeginLoc);
383383
size_t Length;
384-
std::string Unexpanded;
385384
if (MI->isFunctionLike()) {
386385
clang::SourceLocation EndLoc(Range.getEnd());
387386
const char *EndPtr = PP.getSourceManager().getCharacterData(EndLoc) + 1;
@@ -1328,7 +1327,6 @@ void PreprocessorCallbacks::Defined(const clang::Token &MacroNameTok,
13281327
clang::SourceLocation Loc(Range.getBegin());
13291328
clang::IdentifierInfo *II = MacroNameTok.getIdentifierInfo();
13301329
const clang::MacroInfo *MI = MD.getMacroInfo();
1331-
std::string MacroName = II->getName().str();
13321330
std::string Unexpanded(getSourceString(PP, Range));
13331331
PPTracker.addMacroExpansionInstance(
13341332
PP, PPTracker.getCurrentHeaderHandle(), Loc,

0 commit comments

Comments
 (0)