[clang-tools-extra] [include cleaner] Use tooling::HeaderIncludes for include insertions and deletions (PR #212852)

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 4 05:15:14 PDT 2026


kadircet wrote:

> Instead of relying on magic UINT_MAX replacements for clang-format to resolve, this change uses tooling::HeaderIncludes to calculate precise offsets and replacement text for adding and removing headers.

Thanks, unfortunately I also no longer remember the reason why we went with clang-format's special handling in the first place. I am worried that these might be behaving differently on certain edge cases.

What do we gain in particular by migrating from one way of doing this to another (apart from new way being less magic)?

https://github.com/llvm/llvm-project/pull/212852


More information about the cfe-commits mailing list