Style: Mark clang-format 16 as supported for pre-commit hook #85837
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It only introduced a difference in a .glsl file, which I've worked around by removing an empty line. This keeps formatting consistent between clang-format 15 and 16.
Also added a change in the 3-to-4 project converter to fix bogus formatting in clang-format < 17.
clang-format 17 on the other hand seems to introduce some differences around the handling of
*
and&
in macros, which aren't compatible with the output of earlier versions.Some of those changes are correct (when
*
and&
are used as math operators), and others are wrong (when they're used as pointer operators).Below is the full diff generated by clang-format 17. We could live with these changes being the new baseline, even if some are technically a bit wrong. But reapplying clang-format 15 on top of it reverts those changes back, so we'd have to bump our minimal version to 17 :( So for now I'm opting for keeping 13-16 compatibility, and we can evaluate 17+ once clang-format 18 is out.