[clang-tools-extra] Remove unused local variables (NFC) (#142881)
This commit is contained in:
parent
0bcf9af591
commit
86f8be6a7c
@ -167,13 +167,11 @@ createSymbolIndexManager(StringRef FilePath) {
|
|||||||
// Parse input and fill the database with it.
|
// Parse input and fill the database with it.
|
||||||
// <symbol>=<header><, header...>
|
// <symbol>=<header><, header...>
|
||||||
// Multiple symbols can be given, separated by semicolons.
|
// Multiple symbols can be given, separated by semicolons.
|
||||||
std::map<std::string, std::vector<std::string>> SymbolsMap;
|
|
||||||
SmallVector<StringRef, 4> SemicolonSplits;
|
SmallVector<StringRef, 4> SemicolonSplits;
|
||||||
StringRef(Input).split(SemicolonSplits, ";");
|
StringRef(Input).split(SemicolonSplits, ";");
|
||||||
std::vector<find_all_symbols::SymbolAndSignals> Symbols;
|
std::vector<find_all_symbols::SymbolAndSignals> Symbols;
|
||||||
for (StringRef Pair : SemicolonSplits) {
|
for (StringRef Pair : SemicolonSplits) {
|
||||||
auto Split = Pair.split('=');
|
auto Split = Pair.split('=');
|
||||||
std::vector<std::string> Headers;
|
|
||||||
SmallVector<StringRef, 4> CommaSplits;
|
SmallVector<StringRef, 4> CommaSplits;
|
||||||
Split.second.split(CommaSplits, ",");
|
Split.second.split(CommaSplits, ",");
|
||||||
for (size_t I = 0, E = CommaSplits.size(); I != E; ++I)
|
for (size_t I = 0, E = CommaSplits.size(); I != E; ++I)
|
||||||
|
@ -20,8 +20,7 @@ ExceptionEscapeCheck::ExceptionEscapeCheck(StringRef Name,
|
|||||||
ClangTidyContext *Context)
|
ClangTidyContext *Context)
|
||||||
: ClangTidyCheck(Name, Context),
|
: ClangTidyCheck(Name, Context),
|
||||||
RawIgnoredExceptions(Options.get("IgnoredExceptions", "")) {
|
RawIgnoredExceptions(Options.get("IgnoredExceptions", "")) {
|
||||||
llvm::SmallVector<StringRef, 8> FunctionsThatShouldNotThrowVec,
|
llvm::SmallVector<StringRef, 8> IgnoredExceptionsVec;
|
||||||
IgnoredExceptionsVec;
|
|
||||||
|
|
||||||
llvm::StringSet<> IgnoredExceptions;
|
llvm::StringSet<> IgnoredExceptions;
|
||||||
StringRef(RawIgnoredExceptions).split(IgnoredExceptionsVec, ",", -1, false);
|
StringRef(RawIgnoredExceptions).split(IgnoredExceptionsVec, ",", -1, false);
|
||||||
|
@ -88,10 +88,6 @@ static void addParantheses(const BinaryOperator *BinOp,
|
|||||||
void MathMissingParenthesesCheck::check(
|
void MathMissingParenthesesCheck::check(
|
||||||
const MatchFinder::MatchResult &Result) {
|
const MatchFinder::MatchResult &Result) {
|
||||||
const auto *BinOp = Result.Nodes.getNodeAs<BinaryOperator>("binOp");
|
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 SourceManager &SM = *Result.SourceManager;
|
||||||
const clang::LangOptions &LO = Result.Context->getLangOpts();
|
const clang::LangOptions &LO = Result.Context->getLangOpts();
|
||||||
addParantheses(BinOp, nullptr, this, SM, LO);
|
addParantheses(BinOp, nullptr, this, SM, LO);
|
||||||
|
@ -913,7 +913,6 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
|
|||||||
if (!ResourceDir.empty())
|
if (!ResourceDir.empty())
|
||||||
Opts.ResourceDir = ResourceDir;
|
Opts.ResourceDir = ResourceDir;
|
||||||
Opts.BuildDynamicSymbolIndex = true;
|
Opts.BuildDynamicSymbolIndex = true;
|
||||||
std::vector<std::unique_ptr<SymbolIndex>> IdxStack;
|
|
||||||
#if CLANGD_ENABLE_REMOTE
|
#if CLANGD_ENABLE_REMOTE
|
||||||
if (RemoteIndexAddress.empty() != ProjectRoot.empty()) {
|
if (RemoteIndexAddress.empty() != ProjectRoot.empty()) {
|
||||||
llvm::errs() << "remote-index-address and project-path have to be "
|
llvm::errs() << "remote-index-address and project-path have to be "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user