Translation units with multiple direct modular dependencies trigger a non-deterministic ordering in clang-scan-deps. This boils down to usage of std::unordered_map, which gets replaced by std::map in this patch.
Depends on D103526.
jansvoboda11 on Jun 7 2021, 6:09 AM.Authored by
I'm not sure the performance problems with std::map will matter in practice here, but have you considered sorting before emission rather than relying on the data structure's iteration order? (It'd make it easy to switch to StringMap in the future.)