[clang] [clang][Dependency Scanning] Fix the In-Memory Buffer Used for By-Name Scanning (PR #183396)

Qiongsi Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 4 09:20:01 PST 2026


================
@@ -154,6 +154,16 @@ class CompilerInstanceWithContext {
       IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS);
   bool computeDependencies(StringRef ModuleName, DependencyConsumer &Consumer,
                            DependencyActionController &Controller);
+
+  // FIXME: see if we can use a smaller fake buffer, or set the buffer's size
----------------
qiongsiwu wrote:

It bugs me that we have to create a 64k empty string that does not do anything else to report correct source locations, hence I added a FIXME so we can review in the future when we have better ways to deal with source locations. In the grand scheme of things, the cost is not high because the workers share the same string. 

The FIXME is removed, and this comment is revised to better indicate that this is the limit on the number of queries. 

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


More information about the cfe-commits mailing list