Skip to content

Commit 1611ca0

Browse files
authored
Merge pull request #69404 from tshortli/fix-unused-variable-warnings
NFC: Fix unused variable warnings
2 parents c10c4fc + d0a4f26 commit 1611ca0

File tree

5 files changed

+4
-7
lines changed

5 files changed

+4
-7
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4992,7 +4992,6 @@ synthesizeBaseClassMethodBody(AbstractFunctionDecl *afd, void *context) {
49924992
auto baseMember = static_cast<FuncDecl *>(context);
49934993
auto baseStruct =
49944994
cast<NominalTypeDecl>(baseMember->getDeclContext()->getAsDecl());
4995-
auto baseType = baseStruct->getDeclaredType();
49964995

49974996
auto forwardedFunc = synthesizeBaseFunctionDeclCall(
49984997
*static_cast<ClangImporter *>(ctx.getClangModuleLoader()), ctx,

lib/DriverTool/swift_llvm_opt_main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ int swift_llvm_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
232232

233233
PrintPassOpts.Verbose = false;
234234
PrintPassOpts.SkipAnalyses = false;
235-
auto &Mod = *M;
236235
llvm::StandardInstrumentations SI(M->getContext(), false, false, PrintPassOpts);
237236
SI.registerCallbacks(PIC, &MAM);
238237

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2991,10 +2991,10 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic(
29912991
// Ok, we now have our insert pt. Call the appropriate operations.
29922992
assert(InsertPt);
29932993
if (auto *InsertBefore = InsertPt.dyn_cast<llvm::Instruction *>()) {
2994-
auto *Inst = inserter.insert(Storage, Var, Expr, DL, InsertBefore);
2994+
inserter.insert(Storage, Var, Expr, DL, InsertBefore);
29952995
} else {
2996-
auto *Inst = inserter.insert(Storage, Var, Expr, DL,
2997-
InsertPt.get<llvm::BasicBlock *>());
2996+
inserter.insert(Storage, Var, Expr, DL,
2997+
InsertPt.get<llvm::BasicBlock *>());
29982998
}
29992999
return;
30003000
}

lib/PrintAsClang/PrintAsClang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static void collectClangModuleHeaderIncludes(
315315
} else if (llvm::Optional<clang::Module::DirectoryName> umbrellaDir = clangModule->getUmbrellaDirAsWritten()) {
316316
SmallString<128> nativeUmbrellaDirPath;
317317
std::error_code errorCode;
318-
llvm::sys::path::native(umbrellaDir->Entry.getDirEntry().getName(),
318+
llvm::sys::path::native(umbrellaDir->Entry.getName(),
319319
nativeUmbrellaDirPath);
320320
llvm::vfs::FileSystem &fileSystem = fileManager.getVirtualFileSystem();
321321
for (llvm::vfs::recursive_directory_iterator

lib/Sema/TypeCheckEffects.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2818,7 +2818,6 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
28182818
// HACK: functions can get queued multiple times in
28192819
// definedFunctions, so be sure to be idempotent.
28202820
if (!E->isThrowsSet()) {
2821-
auto throwsKind = classification.getConditionalKind(EffectKind::Throws);
28222821
E->setThrows(throwDest);
28232822
}
28242823

0 commit comments

Comments
 (0)