[PATCH] D59811: [clangd] Add fallback mode for code completion when compile command or preamble is not ready.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 4 02:45:07 PDT 2019


ilya-biryukov added a comment.

Sam, thanks for taking a look and the useful comments!

@ioeric, I second Sam's suggestion to split the compile command and the fallback action into two changes. This would make it easier to review those in isolation. Could you do this please?



================
Comment at: clangd/TUScheduler.h:204
+                       Callback<InputsAndPreamble> Action,
+                       bool AllowFallback = false);
 
----------------
sammccall wrote:
> I think this isn't orthogonal to `PreambleConsistency`.
> When would we use AllowFallback = true but PreambleConsistency = Consistent?
> 
> Two possible options:
>  - adding a new `StaleOrAbsent` option to PreambleConsistency
>  - changing `Stale` to these new semantics, as codeComplete is the only caller
> The problem with the latter is we can't put it behind a flag.
Ah, I was totally looking past the `PreambleConsistency` flag.
Thanks for spotting this. Indeed, modeling the fallback in the `PreambleConsistency` would make sense.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D59811





More information about the cfe-commits mailing list