Skip to content

Make newer clang-format versions produce same format - #1144

Open
mhucka wants to merge 1 commit into
tensorflow:masterfrom
mhucka:tweak-clang-format-config
Open

mhucka wants to merge 1 commit into
tensorflow:masterfrom
mhucka:tweak-clang-format-config

Conversation

@mhucka

@mhucka mhucka commented Nov 20, 2026

Copy link
Copy Markdown
Member

In clang-format 22.1.8, the Google style preset sets DerivePointerAlignment: false and PointerAlignment: Left. This is different from earlier versions of clang-format, which defaulted DerivePointerAlignment to true for Google).

Setting DerivePointerAlignment: true in .clang-format lets us support both older and newer versions of clang-format.

In clang-format 22.1.8, the Google style preset sets
`DerivePointerAlignment: false` and `PointerAlignment: Left`. This is
different from earlier versions of `clang-format`, which defaulted
`DerivePointerAlignment` to true for Google).

Setting `DerivePointerAlignment: true` in `.clang-format` lets us
support both older and newer versions of clang-format.
@mhucka
mhucka marked this pull request as ready for review November 20, 2026 03:51

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the .clang-format configuration file by adding the DerivePointerAlignment: true setting. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant