[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

Qiongsi Wu via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 23 12:48:46 PDT 2025


================
@@ -87,6 +88,9 @@ class DependencyCollector {
                                   bool IsSystem, bool IsModuleFile,
                                   bool IsMissing);
 
+  /// @return the PPCallback this collector added to the Preprocessor.
+  virtual PPCallbacks *getPPCallbacks() { return nullptr; };
----------------
qiongsiwu wrote:

I think we will need this interface for CAS in `next`. 

For example, I think we want to have it for `AttachOnlyDependencyCollector` https://github.com/swiftlang/llvm-project/blob/251a2e715ced8f58964e794acc73704774aa4a98/clang/lib/Tooling/DependencyScanning/IncludeTreeActionController.cpp#L146

I tried to think of a few ways to do away with this interface but I could not find a good one taking the CAS collector into account. I am all ears for a different way to do this. 

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


More information about the cfe-commits mailing list