| Issue |
204328
|
| Summary |
clang-format : More options for IncludeCategories
|
| Labels |
clang-format
|
| Assignees |
|
| Reporter |
AdrienMatricon
|
In clang-format, the `IncludeCategories` option allows to sort includes into categories so that other options may set them to be automatically grouped.
This is a very nice thing to be able to do, but in practice I find myself unable to express the categories that I want to express due to the need to equate the category to a regex.
Here are two things I was unable to express :
- Splitting includes matching the pattern `#include <X/*>` into a category for each unique value of `X`
* It is still relying on regex so it shouldn't be too far from how things currently work
* Sorting priority among those can then be based on any order on the values of `X`
- Having a category for all includes from the C++ standard library
* They don't match any regex pattern that I know of
* It seems strange to me that a tool that knows C++ would not know what the standard headers are
* It would also be useful if the tool also knew to recognize posix and/or system headers, but this is more of a stretch
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs