[clang-tools-extra] 667867e - [clangd] Enable recovery-ast-type by default.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 26 07:47:15 PDT 2020


Author: Haojian Wu
Date: 2020-08-26T16:47:04+02:00
New Revision: 667867e0df26e45ed2c86e192fee69dd484167c7

URL: https://github.com/llvm/llvm-project/commit/667867e0df26e45ed2c86e192fee69dd484167c7
DIFF: https://github.com/llvm/llvm-project/commit/667867e0df26e45ed2c86e192fee69dd484167c7.diff

LOG: [clangd] Enable recovery-ast-type by default.

Differential Revision: https://reviews.llvm.org/D86602

Added: 
    

Modified: 
    clang-tools-extra/clangd/ClangdServer.h
    clang-tools-extra/clangd/tool/ClangdMain.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/ClangdServer.h b/clang-tools-extra/clangd/ClangdServer.h
index 7068cd5eb4217..ae10dba32b58c 100644
--- a/clang-tools-extra/clangd/ClangdServer.h
+++ b/clang-tools-extra/clangd/ClangdServer.h
@@ -131,7 +131,7 @@ class ClangdServer {
     bool BuildRecoveryAST = true;
 
     /// If true, turn on the `-frecovery-ast-type` clang flag.
-    bool PreserveRecoveryASTType = false;
+    bool PreserveRecoveryASTType = true;
 
     /// Clangd's workspace root. Relevant for "workspace" operations not bound
     /// to a particular file.

diff  --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index 57dac600014d5..dcbaa35238226 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -291,9 +291,8 @@ opt<bool> RecoveryAST{
 opt<bool> RecoveryASTType{
     "recovery-ast-type",
     cat(Features),
-    desc("Preserve the type for recovery AST. Note that "
-         "this feature is experimental and may lead to crashes"),
-    init(false),
+    desc("Preserve the type for recovery AST."),
+    init(ClangdServer::Options().PreserveRecoveryASTType),
     Hidden,
 };
 


        


More information about the cfe-commits mailing list