Implementing a FixItHint which indicates that code needs reformatting but not changing.
This is achieved by creating a FixItHint where the RemoveRange is equal to the InsertFromRange.
This means any dependent clients wont need updating as that is essentially a no-op. For clients that (are updated to) handle it, it signifies that code needs reformatting.
Currently this has been added to clang-tidy but for any refactoring tool that uses the Replacements its rather trivial to include support.
Generally this should be tacked onto other fix-its that maybe span multiple lines or insert/remove braces.
in theory yes, as we have access to source manager, we can fetch file contents and create formatted replacements (see cleanupAndFormat). but formatting those fixes can imply significant delays on clangd's diagnostic cycles (if there are many of those), that's the reason why we currently don't format fixits.