[clang-tools-extra] Remove unused local variables (NFC) (#142881)

This commit is contained in:
Kazu Hirata 2025-06-04 22:43:59 -07:00 committed by GitHub
parent 0bcf9af591
commit 86f8be6a7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 9 deletions

View File

@ -167,13 +167,11 @@ createSymbolIndexManager(StringRef FilePath) {
// Parse input and fill the database with it.
// <symbol>=<header><, header...>
// Multiple symbols can be given, separated by semicolons.
std::map<std::string, std::vector<std::string>> SymbolsMap;
SmallVector<StringRef, 4> SemicolonSplits;
StringRef(Input).split(SemicolonSplits, ";");
std::vector<find_all_symbols::SymbolAndSignals> Symbols;
for (StringRef Pair : SemicolonSplits) {
auto Split = Pair.split('=');
std::vector<std::string> Headers;
SmallVector<StringRef, 4> CommaSplits;
Split.second.split(CommaSplits, ",");
for (size_t I = 0, E = CommaSplits.size(); I != E; ++I)

View File

@ -20,8 +20,7 @@ ExceptionEscapeCheck::ExceptionEscapeCheck(StringRef Name,
ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
RawIgnoredExceptions(Options.get("IgnoredExceptions", "")) {
llvm::SmallVector<StringRef, 8> FunctionsThatShouldNotThrowVec,
IgnoredExceptionsVec;
llvm::SmallVector<StringRef, 8> IgnoredExceptionsVec;
llvm::StringSet<> IgnoredExceptions;
StringRef(RawIgnoredExceptions).split(IgnoredExceptionsVec, ",", -1, false);

View File

@ -88,10 +88,6 @@ static void addParantheses(const BinaryOperator *BinOp,
void MathMissingParenthesesCheck::check(
const MatchFinder::MatchResult &Result) {
const auto *BinOp = Result.Nodes.getNodeAs<BinaryOperator>("binOp");
std::vector<
std::pair<clang::SourceRange, std::pair<const clang::BinaryOperator *,
const clang::BinaryOperator *>>>
Insertions;
const SourceManager &SM = *Result.SourceManager;
const clang::LangOptions &LO = Result.Context->getLangOpts();
addParantheses(BinOp, nullptr, this, SM, LO);

View File

@ -913,7 +913,6 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
if (!ResourceDir.empty())
Opts.ResourceDir = ResourceDir;
Opts.BuildDynamicSymbolIndex = true;
std::vector<std::unique_ptr<SymbolIndex>> IdxStack;
#if CLANGD_ENABLE_REMOTE
if (RemoteIndexAddress.empty() != ProjectRoot.empty()) {
llvm::errs() << "remote-index-address and project-path have to be "