Sirui Mu 573c0be730
[clang][Tooling] Insert global module fragment during header insertion (#173724)
This patch makes `HeaderIncludes` to also insert a global module
fragment declaration (`module;`) when inserting a header when all of the
following conditions are met:

- The source file is a module unit;
- No tokens excluding comments and whitespaces exist before the module
declaration.

This patch detects the conditions by checking whether the first
declaration in the source file is a module declaration.
2026-01-03 14:47:38 +08:00
..