Comment #12 on issue 805 by kimgr: Nondeterministic output of cstdint vs. stdint.h
https://github.com/include-what-you-use/include-what-you-use/issues/805
@ptomato Thanks to #982, I think I finally have a clue here.
* The files to analyze are stored as a set, and therefore analyzed in unspecified order
* If there's only a single main file with a single associated header (e.g. `foo.cpp` with `foo.h`, which is the common case), the associated is analyzed first, and then the main, no surprises
* But if there are multiple associated headers, interdependencies between them can cause confusion
* Besides associated headers `--check_also` adds additional files to the set of files to analyze, and I suspect triggers the same kind of confusion
QED:
https://gitlab.gnome.org/GNOME/gjs/-/blob/master/tools/run_iwyu.sh#L92 :smiley:
I still need to think about how/if/why there's interference between these additional files, but I think this might be signal that the root cause is in sight.