[PATCH] D89233: [clangd] Refine recoveryAST flags in clangd

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 14 04:40:39 PDT 2020


hokein marked an inline comment as done.
hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/Compiler.cpp:84
 
-  // Recovery expression currently only works for C++.
-  if (CI->getLangOpts()->CPlusPlus) {
-    CI->getLangOpts()->RecoveryAST = Inputs.Opts.BuildRecoveryAST;
-    CI->getLangOpts()->RecoveryASTType = Inputs.Opts.PreserveRecoveryASTType;
-  }
+  if (Inputs.Opts.BuildRecoveryAST)
+    CI->getLangOpts()->RecoveryAST = true;
----------------
sammccall wrote:
> I don't have any problem with the changes to the flags, but we can also do experiments just with config now:
> 
> ```
> CompileFlags:
>   Add: [-Xclang, -frecovery-ast]
> ```
> 
> in ~/.config/clangd/config.yaml
this sounds a new idea, but it looks like our internal client doesn't fully support config (yet?). 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89233/new/

https://reviews.llvm.org/D89233



More information about the cfe-commits mailing list