This revision was automatically updated to reflect the committed changes. Closed by commit rGe6be5c7cd6d2: [clangd] Remove the recovery-ast options. (authored by sammccall).
Changed prior to commit: https://reviews.llvm.org/D94724?vs=316783&id=317816#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94724/new/ https://reviews.llvm.org/D94724 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-extra/clangd/ClangdServer.h clang-tools-extra/clangd/Compiler.cpp clang-tools-extra/clangd/Compiler.h clang-tools-extra/clangd/tool/ClangdMain.cpp
Index: clang-tools-extra/clangd/tool/ClangdMain.cpp =================================================================== --- clang-tools-extra/clangd/tool/ClangdMain.cpp +++ clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -312,14 +312,15 @@ "recovery-ast", cat(Features), desc("Preserve expressions in AST for broken code."), - init(ClangdServer::Options().BuildRecoveryAST), + init(false), + Hidden, }; opt<bool> RecoveryASTType{ "recovery-ast-type", cat(Features), desc("Preserve the type for recovery AST."), - init(ClangdServer::Options().PreserveRecoveryASTType), + init(false), Hidden, }; @@ -813,8 +814,6 @@ Opts.StaticIndex = PAI.get(); } Opts.AsyncThreadsCount = WorkerThreadsCount; - Opts.BuildRecoveryAST = RecoveryAST; - Opts.PreserveRecoveryASTType = RecoveryASTType; Opts.FoldingRanges = FoldingRanges; Opts.MemoryCleanup = getMemoryCleanupFunction(); Index: clang-tools-extra/clangd/Compiler.h =================================================================== --- clang-tools-extra/clangd/Compiler.h +++ clang-tools-extra/clangd/Compiler.h @@ -38,8 +38,6 @@ // Options to run clang e.g. when parsing AST. struct ParseOptions { bool SuggestMissingIncludes = false; - bool BuildRecoveryAST = false; - bool PreserveRecoveryASTType = false; }; /// Information required to run clang, e.g. to parse AST or do code completion. Index: clang-tools-extra/clangd/Compiler.cpp =================================================================== --- clang-tools-extra/clangd/Compiler.cpp +++ clang-tools-extra/clangd/Compiler.cpp @@ -85,11 +85,6 @@ // Don't crash on `#pragma clang __debug parser_crash` CI->getPreprocessorOpts().DisablePragmaDebugCrash = true; - if (Inputs.Opts.BuildRecoveryAST) - CI->getLangOpts()->RecoveryAST = true; - if (Inputs.Opts.PreserveRecoveryASTType) - CI->getLangOpts()->RecoveryASTType = true; - return CI; } Index: clang-tools-extra/clangd/ClangdServer.h =================================================================== --- clang-tools-extra/clangd/ClangdServer.h +++ clang-tools-extra/clangd/ClangdServer.h @@ -118,14 +118,6 @@ /// checks will be disabled. TidyProviderRef ClangTidyProvider; - /// If true, force -frecovery-ast flag. - /// If false, respect the value in clang. - bool BuildRecoveryAST = false; - - /// If true, force -frecovery-ast-type flag. - /// If false, respect the value in clang. - bool PreserveRecoveryASTType = false; - /// Clangd's workspace root. Relevant for "workspace" operations not bound /// to a particular file. /// FIXME: If not set, should use the current working directory. @@ -388,11 +380,6 @@ // can be caused by missing includes (e.g. member access in incomplete type). bool SuggestMissingIncludes = false; - // If true, preserve expressions in AST for broken code. - bool BuildRecoveryAST = true; - // If true, preserve the type for recovery AST. - bool PreserveRecoveryASTType = false; - // GUARDED_BY(CachedCompletionFuzzyFindRequestMutex) llvm::StringMap<llvm::Optional<FuzzyFindRequest>> CachedCompletionFuzzyFindRequestByFile; Index: clang-tools-extra/clangd/ClangdServer.cpp =================================================================== --- clang-tools-extra/clangd/ClangdServer.cpp +++ clang-tools-extra/clangd/ClangdServer.cpp @@ -147,8 +147,6 @@ : nullptr), ClangTidyProvider(Opts.ClangTidyProvider), SuggestMissingIncludes(Opts.SuggestMissingIncludes), - BuildRecoveryAST(Opts.BuildRecoveryAST), - PreserveRecoveryASTType(Opts.PreserveRecoveryASTType), WorkspaceRoot(Opts.WorkspaceRoot), // Pass a callback into `WorkScheduler` to extract symbols from a newly // parsed file and rebuild the file index synchronously each time an AST @@ -214,8 +212,6 @@ Inputs.Opts = std::move(Opts); Inputs.Index = Index; Inputs.ClangTidyProvider = ClangTidyProvider; - Inputs.Opts.BuildRecoveryAST = BuildRecoveryAST; - Inputs.Opts.PreserveRecoveryASTType = PreserveRecoveryASTType; bool NewFile = WorkScheduler.update(File, Inputs, WantDiags); // If we loaded Foo.h, we want to make sure Foo.cpp is indexed. if (NewFile && BackgroundIdx) @@ -253,8 +249,6 @@ } ParseInputs ParseInput{IP->Command, &TFS, IP->Contents.str()}; ParseInput.Index = Index; - ParseInput.Opts.BuildRecoveryAST = BuildRecoveryAST; - ParseInput.Opts.PreserveRecoveryASTType = PreserveRecoveryASTType; CodeCompleteOpts.MainFileSignals = IP->Signals; // FIXME(ibiryukov): even if Preamble is non-null, we may want to check @@ -300,8 +294,6 @@ ParseInputs ParseInput{IP->Command, &TFS, IP->Contents.str()}; ParseInput.Index = Index; - ParseInput.Opts.BuildRecoveryAST = BuildRecoveryAST; - ParseInput.Opts.PreserveRecoveryASTType = PreserveRecoveryASTType; CB(clangd::signatureHelp(File, Pos, *PreambleData, ParseInput)); };
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits