[cfe-dev] [clang-format] sort includes and group per category

Wim Leflere via cfe-dev cfe-dev at lists.llvm.org
Mon Oct 23 12:22:54 PDT 2017


To fix bug 28203 and improve the includes sorting, I would like to add an
includes grouping feature.

A 'GroupIncludes (bool)' format option could be added to group the includes
per category.
The includes could be grouped with a empty line between every group.

Example priorities: system includes 3, boost 2, other 1
before:
#include <memory>
#include <boost/make_shared.hpp>
#include "Device.h"

after:
#include "Device.h"

#include <boost/make_shared.hpp>

#include <memory>

What do you think of the proposal?

Regards,

Wim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171023/f1c48362/attachment.html>


More information about the cfe-dev mailing list