[clang-tools-extra] c8a3572 - [clangd] Make dexp command line options sticky
Yevgeny Rouban via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 8 22:01:19 PST 2022
Author: Yevgeny Rouban
Date: 2022-03-09T13:00:25+07:00
New Revision: c8a35727fe7cdb06bf2a081356c36a5159598e9f
URL: https://github.com/llvm/llvm-project/commit/c8a35727fe7cdb06bf2a081356c36a5159598e9f
DIFF: https://github.com/llvm/llvm-project/commit/c8a35727fe7cdb06bf2a081356c36a5159598e9f.diff
LOG: [clangd] Make dexp command line options sticky
Preparing for the cl::opt reset fix proposed on D115433 this
patch fixes the dexp tool to preserve its three command line
options (IndexLocation, ExecCommand, ProjectRoot) from reset
that is done before parsing query options.
Tags: #clang
Added:
Modified:
clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
index c6cefdf675ef5..7bbcba3398335 100644
--- a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
+++ b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
@@ -416,9 +416,9 @@ int main(int argc, const char *argv[]) {
// Preserve global options when flag parser is reset, so commands can use
// them.
- IndexLocation.setValue(IndexLocation, /*initial=*/ true);
- ExecCommand.setValue(ExecCommand, /*initial=*/ true);
- ProjectRoot.setValue(ProjectRoot, /*initial=*/ true);
+ IndexLocation.setValue(IndexLocation, /*initial=*/true);
+ ExecCommand.setValue(ExecCommand, /*initial=*/true);
+ ProjectRoot.setValue(ProjectRoot, /*initial=*/true);
llvm::cl::ResetCommandLineParser(); // We reuse it for REPL commands.
llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
More information about the cfe-commits
mailing list