jansvoboda11 marked 2 inline comments as done. jansvoboda11 added inline comments.
================ Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:788 + if (Format == ScanningOutputFormat::Full && ModuleName.empty()) + FD.resize(Inputs.size()); + ---------------- benlangmuir wrote: > Since you should never resize `FullDeps` after you start, how about removing > `resize` and instead: > * Make `FullDeps` constructor take the size > * Change `FullDeps FD;` to `std::optional<FullDeps>` > * Change this line to `FullDeps.emplace(Inputs.size())` We don't want to resize when we're only scanning by module name, in that case our input is not a translation unit. I implemented your idea and will try to improve how we model the result types in a follow-up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145098/new/ https://reviews.llvm.org/D145098 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits