Skip to content

NFC: Fix unused variable warnings #69404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/ClangImporter/ClangImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4992,7 +4992,6 @@ synthesizeBaseClassMethodBody(AbstractFunctionDecl *afd, void *context) {
auto baseMember = static_cast<FuncDecl *>(context);
auto baseStruct =
cast<NominalTypeDecl>(baseMember->getDeclContext()->getAsDecl());
auto baseType = baseStruct->getDeclaredType();

auto forwardedFunc = synthesizeBaseFunctionDeclCall(
*static_cast<ClangImporter *>(ctx.getClangModuleLoader()), ctx,
Expand Down
1 change: 0 additions & 1 deletion lib/DriverTool/swift_llvm_opt_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ int swift_llvm_opt_main(ArrayRef<const char *> argv, void *MainAddr) {

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

Expand Down
6 changes: 3 additions & 3 deletions lib/IRGen/IRGenDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2991,10 +2991,10 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic(
// Ok, we now have our insert pt. Call the appropriate operations.
assert(InsertPt);
if (auto *InsertBefore = InsertPt.dyn_cast<llvm::Instruction *>()) {
auto *Inst = inserter.insert(Storage, Var, Expr, DL, InsertBefore);
inserter.insert(Storage, Var, Expr, DL, InsertBefore);
} else {
auto *Inst = inserter.insert(Storage, Var, Expr, DL,
InsertPt.get<llvm::BasicBlock *>());
inserter.insert(Storage, Var, Expr, DL,
InsertPt.get<llvm::BasicBlock *>());
}
return;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/PrintAsClang/PrintAsClang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static void collectClangModuleHeaderIncludes(
} else if (llvm::Optional<clang::Module::DirectoryName> umbrellaDir = clangModule->getUmbrellaDirAsWritten()) {
SmallString<128> nativeUmbrellaDirPath;
std::error_code errorCode;
llvm::sys::path::native(umbrellaDir->Entry.getDirEntry().getName(),
llvm::sys::path::native(umbrellaDir->Entry.getName(),
nativeUmbrellaDirPath);
llvm::vfs::FileSystem &fileSystem = fileManager.getVirtualFileSystem();
for (llvm::vfs::recursive_directory_iterator
Expand Down
1 change: 0 additions & 1 deletion lib/Sema/TypeCheckEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2818,7 +2818,6 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
// HACK: functions can get queued multiple times in
// definedFunctions, so be sure to be idempotent.
if (!E->isThrowsSet()) {
auto throwsKind = classification.getConditionalKind(EffectKind::Throws);
E->setThrows(throwDest);
}

Expand Down