kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:308
+          if (C.Index.Background == Config::BackgroundPolicy::Auto)
+            C.Index.Background = Config::BackgroundPolicy::Skip;
         });
----------------
sammccall wrote:
> doesn't this mean that if a user has explicit `Background: Build` at a higher 
> scope, then a more narrowly scoped external index won't disable it?
> 
> This seems at least as confusing as the problems this is trying to solve.
> doesn't this mean that if a user has explicit Background: Build at a higher 
> scope, then a more narrowly scoped external index won't disable it?

Yes. The motivating case I had was something like this:
- Let's say user turns background-index on inside 
`llvm-project/clang-tools-extra/clangd/.clangd`.
- Defines an external index via user-config for `llvm-project`.

Since user-config is the inner-most provider, it will turn off the 
backgrond-indexing implicitly for the whole project, and user won't be able to 
turn it on for a subdirectory without specifying that in user-config directory 
too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90775

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to