Bigcheese added inline comments.
================ Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp:97 + if (OutputPaths.empty()) + OutputPaths = Opts.Targets; Dependencies.push_back(File); ---------------- arphaman wrote: > Bigcheese wrote: > > arphaman wrote: > > > What if `Opts.Targets` is empty? > > If I recall correctly, `Opts.Targets` can never be empty. I gets set to > > `<basename>.o` if it would be empty. > What I mean is, what if the client didn't request a dependency file in the > original compilation command? ScanDeps worker currently has a fake > `"clang-scan-deps dependency"` target that it adds if the target is empty, > but I do't think that should be reported as an output file. Ah, I see now. This is only needed for the compilation database case (as that's the only way to map back to a compile command), it's not needed if you're calling `getFullDependencies` directly. I can remove it for now, but I'm not really sure what to replace it with. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70268/new/ https://reviews.llvm.org/D70268 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits