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

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 26 02:00:47 PDT 2020


hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: usaxena95, kadircet, arphaman, jkorous.
Herald added a project: clang.
hokein requested review of this revision.
Herald added subscribers: MaskRay, ilya-biryukov.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86602

Files:
  clang-tools-extra/clangd/ClangdServer.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
@@ -291,9 +291,8 @@
 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,
 };
 
Index: clang-tools-extra/clangd/ClangdServer.h
===================================================================
--- clang-tools-extra/clangd/ClangdServer.h
+++ clang-tools-extra/clangd/ClangdServer.h
@@ -131,7 +131,7 @@
     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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86602.287874.patch
Type: text/x-patch
Size: 1107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200826/86bfd662/attachment.bin>


More information about the cfe-commits mailing list