Index: clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp =================================================================== --- clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp +++ clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp @@ -413,6 +413,12 @@ using namespace clang::clangd; llvm::cl::ParseCommandLineOptions(argc, argv, Overview); + + // Protect IndexLocation, ExecCommand and ProjectRoot from being reset. + IndexLocation.setValue(IndexLocation, true /* initial */); + ExecCommand.setValue(ExecCommand, true /* initial */); + ProjectRoot.setValue(ProjectRoot, true /* initial */); + llvm::cl::ResetCommandLineParser(); // We reuse it for REPL commands. llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);