================ @@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref<void(CompilerInstance &)> OnCI; ---------------- jansvoboda11 wrote:
`function_ref` is safe here because `ReadPCHAndPreprocessAction ` is a stack variable in `DependencyScanningAction::runInvocation()` where it's clear the callback live long enough. I don't mind being on the safe side and turning this into `std::function` if you'd prefer. https://github.com/llvm/llvm-project/pull/86358 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits