[PATCH] D81739: [clangd] Turn on RecoveryAST for clangd by default.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 15 02:08:35 PDT 2020
hokein updated this revision to Diff 270682.
hokein marked an inline comment as done.
hokein added a comment.
address review comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81739/new/
https://reviews.llvm.org/D81739
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
@@ -281,11 +281,10 @@
opt<bool> RecoveryAST{
"recovery-ast",
cat(Features),
- desc("Preserve expressions in AST for broken code (C++ only). Note that "
- "this feature is experimental and may lead to crashes"),
- init(false),
- Hidden,
+ desc("Preserve expressions in AST for broken code (C++ only)."),
+ init(ClangdServer::Options().BuildRecoveryAST),
};
+
opt<bool> RecoveryASTType{
"recovery-ast-type",
cat(Features),
Index: clang-tools-extra/clangd/ClangdServer.h
===================================================================
--- clang-tools-extra/clangd/ClangdServer.h
+++ clang-tools-extra/clangd/ClangdServer.h
@@ -121,7 +121,7 @@
ClangTidyOptionsBuilder GetClangTidyOptions;
/// If true, turn on the `-frecovery-ast` clang flag.
- bool BuildRecoveryAST = false;
+ bool BuildRecoveryAST = true;
/// If true, turn on the `-frecovery-ast-type` clang flag.
bool PreserveRecoveryASTType = false;
@@ -354,7 +354,7 @@
bool SuggestMissingIncludes = false;
// If true, preserve expressions in AST for broken code.
- bool BuildRecoveryAST = false;
+ bool BuildRecoveryAST = true;
// If true, preserve the type for recovery AST.
bool PreserveRecoveryASTType = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81739.270682.patch
Type: text/x-patch
Size: 1482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200615/9afa6710/attachment-0001.bin>
More information about the cfe-commits
mailing list