Currently clang-format would always emit a replacement for multi-block #include
sections if IBS_Regroup, even if the sections are correct:
% cat ~/test.h #include <a.h> #include "b.h" % bin/clang-format --output-replacements-xml -style=google ~/test.h <?xml version='1.0'?> <replacements xml:space='preserve' incomplete_format='false'> <replacement offset='0' length='30'>#include <a.h> #include "b.h"</replacement> </replacements> %
This change makes clang-format not emit replacements in this case.
The logic is similar to the one implemented for Java in r354452.
As most cases would pass 1, maybe it would make sense to make this a class member that defaults to 1? It can be explicitly set in specific tests when needed.