[clang] d68f816 - [clang] Remove unused local variables (NFC) (#249464)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 6 10:42:57 PST 2026
Author: Kazu Hirata
Date: 2026-12-06T10:42:52-08:00
New Revision: d68f816f5f595df851af68280897ff3b4f1ff174
URL: https://github.com/llvm/llvm-project/commit/d68f816f5f595df851af68280897ff3b4f1ff174
DIFF: https://github.com/llvm/llvm-project/commit/d68f816f5f595df851af68280897ff3b4f1ff174.diff
LOG: [clang] Remove unused local variables (NFC) (#249464)
This patch removes unused local variables across clang/.
Note that these variables do not trigger -Wunused-variable because
their types have non-trivial constructors or destructors. Their
initializers have no side effects on surrounding state.
Assisted-by: Antigravity
Added:
Modified:
clang/lib/CodeGen/CGException.cpp
clang/lib/Driver/Driver.cpp
clang/lib/Format/Format.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 75d8a91e03436..84e0827eecb94 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -599,7 +599,6 @@ CodeGenFunction::getFuncletEHDispatchBlock(EHScopeStack::stable_iterator SI) {
DispatchBlock = getTerminateFunclet();
else
DispatchBlock = createBasicBlock();
- CGBuilderTy Builder(CGM, DispatchBlock);
switch (EHS.getKind()) {
case EHScope::Catch:
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 8ef3f4ac88f92..b383a72b1b725 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -3684,8 +3684,6 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
if (PL.empty())
continue;
- auto FullPL = types::getCompilationPhases(InputType);
-
// Build the pipeline for this file.
Action *Current = C.MakeAction<InputAction>(*InputArg, InputType);
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 986994c358dc9..390f03be4bc8a 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -3688,7 +3688,6 @@ static void sortCppIncludes(const FormatStyle &Style,
ArrayRef<tooling::Range> Ranges, StringRef FileName,
StringRef Code, tooling::Replacements &Replaces,
unsigned *Cursor) {
- tooling::IncludeCategoryManager Categories(Style.IncludeStyle, FileName);
const unsigned IncludesBeginOffset = Includes.front().Offset;
const unsigned IncludesEndOffset =
Includes.back().Offset + Includes.back().Text.size();
More information about the cfe-commits
mailing list