[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 17 04:34:33 PDT 2024


================
@@ -112,7 +112,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
                  // Index outlives TUScheduler (declared first)
                  FIndex(FIndex),
                  // shared_ptr extends lifetime
-                 Stdlib(Stdlib)]() mutable {
+                 Stdlib(Stdlib),
+                 // We have some FS implementations that rely on infomration in
+                 // the context.
+                 Ctx(Context::current().clone())]() mutable {
----------------
ilya-biryukov wrote:

@sam-mccall, @usx95 could you please vet this change? 
I'm on vacation since tomorrow and I won't have time to go through this today.
It's probably correct, I'm just missing context to know for sure and getting it will take time.

https://github.com/llvm/llvm-project/pull/88381


More information about the cfe-commits mailing list