jansvoboda11 added a comment. Another option would be to store `ScanInstance` as member of `DependencyScanningAction`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133988/new/ https://reviews.llvm.org/D133988