[llvm-branch-commits] [clang-tools-extra] 3fa2d37 - [clangd][NFC] Improve clangd status messages
Sam McCall via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 21 11:24:12 PST 2020
Author: Quentin Chateau
Date: 2020-12-21T20:19:25+01:00
New Revision: 3fa2d37eb3f8acddcfde749ca822f2cc7d900cbb
URL: https://github.com/llvm/llvm-project/commit/3fa2d37eb3f8acddcfde749ca822f2cc7d900cbb
DIFF: https://github.com/llvm/llvm-project/commit/3fa2d37eb3f8acddcfde749ca822f2cc7d900cbb.diff
LOG: [clangd][NFC] Improve clangd status messages
clangd actions have various naming schemes, the most
common being PascalCase. This commit applies PascalCase
to all clangd actions, and fix the status rendering
in `renderTUAction` to look more consistent.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D93546
Added:
Modified:
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/TUScheduler.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp
index 8b0d0591abe7..b760b31c0b87 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -621,7 +621,7 @@ void ClangdServer::typeHierarchy(PathRef File, Position Pos, int Resolve,
File));
};
- WorkScheduler.runWithAST("Type Hierarchy", File, std::move(Action));
+ WorkScheduler.runWithAST("TypeHierarchy", File, std::move(Action));
}
void ClangdServer::resolveTypeHierarchy(
@@ -642,7 +642,7 @@ void ClangdServer::prepareCallHierarchy(
return CB(InpAST.takeError());
CB(clangd::prepareCallHierarchy(InpAST->AST, Pos, File));
};
- WorkScheduler.runWithAST("Call Hierarchy", File, std::move(Action));
+ WorkScheduler.runWithAST("CallHierarchy", File, std::move(Action));
}
void ClangdServer::incomingCalls(
@@ -678,7 +678,7 @@ void ClangdServer::documentSymbols(llvm::StringRef File,
return CB(InpAST.takeError());
CB(clangd::getDocumentSymbols(InpAST->AST));
};
- WorkScheduler.runWithAST("documentSymbols", File, std::move(Action),
+ WorkScheduler.runWithAST("DocumentSymbols", File, std::move(Action),
TUScheduler::InvalidateOnUpdate);
}
@@ -690,7 +690,7 @@ void ClangdServer::foldingRanges(llvm::StringRef File,
return CB(InpAST.takeError());
CB(clangd::getFoldingRanges(InpAST->AST));
};
- WorkScheduler.runWithAST("foldingRanges", File, std::move(Action),
+ WorkScheduler.runWithAST("FoldingRanges", File, std::move(Action),
TUScheduler::InvalidateOnUpdate);
}
diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp
index 813a000b41a5..7a858664faa5 100644
--- a/clang-tools-extra/clangd/TUScheduler.cpp
+++ b/clang-tools-extra/clangd/TUScheduler.cpp
@@ -1220,7 +1220,7 @@ std::string renderTUAction(const PreambleAction PA, const ASTAction &AA) {
}
if (Result.empty())
return "idle";
- return llvm::join(Result, ",");
+ return llvm::join(Result, ", ");
}
} // namespace
More information about the llvm-branch-commits
mailing list