RFR: 8296886: Fix various include sort order issues [v2]
David Holmes
dholmes at openjdk.org
Wed Nov 23 07:31:24 UTC 2022
On Wed, 23 Nov 2022 07:12:13 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> > I'm not sure why conditional includes (that don't rely on macros.hpp) need to come at the end rather than in normal sort order? I don't care either way but a rationale for this would be good if it is to be the preferred style.
>
> Because the Style Guide says:
>
> * Put conditional inclusions (`#if ...`) at the end of the include list.
Ah I see. Thanks for that @kimbarrett
>
> I think most of our conditional includes these days are to support conditional features. It makes sense to group all the additional includes related to a feature.
True. There are a lot of single includes but it makes sense to have one simple rule.
-------------
PR: https://git.openjdk.org/jdk/pull/11108
More information about the build-dev
mailing list