[PATCH] D143870: [clang-format] Remove all include duplicates not only those in the same block

Fabian Keßler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 06:12:45 PDT 2023


Febbe added a comment.

Actually, I already wanted to add an enum, controlling this behavior. 
But even with an enum, this check should only remove includes in consecutive blocks, which could be relocated (are not split by `#defines` or a comment)
Or I should add the options to `DeduplicateIncludeDirectives`: `{DID_InSameBlock (default), DID_Never, DID_Allways, DID_OnlyConsecutiveBlocks}`

Note, that I use DID_InSameBlock as default, because that's the current behavior, even many people would like to have it off by default.

Regarding the breaking of current features: What would you do, if a break is necessary, to implement a way more useful feature or to fix a huge issue/bug? 
Would you just infer a new version number? (I personally don't like the idea of having version numbers for specific tests, but that would be the easiest way to keep compatibility with old configurations and codebases).
Of course, the assumptions must be proven, as you said.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143870/new/

https://reviews.llvm.org/D143870



More information about the cfe-commits mailing list