Format with clang-foramt 18.1
Pull request
Issue tracker
Fixes will automatically close the related issue
Fixes #
Feature
Describe feature of pull request
Format code with clang-format 18.1.
It's hard for Homebrew to pin or install the older version formula.
Maybe we can use other solution to install specific clang-format version?
Unit test
- [x] Done
Manual test
- [x] Done
Code Review
- Unit and manual test pass
- GitHub Action CI pass
- At least one contributor reviews and votes
- Can be merged clean without conflicts
- PR will be merged by rebase upstream base
Additional Info
Yes, you are right, I have this issue in my local macOS with clang-format 18.
In local homebrew, the clang-format is 18.1.2 right now.
$ brew info clang-format
==> clang-format: stable 18.1.2 (bottled), HEAD
Due to homebrew is hard to install old version: https://github.com/orgs/Homebrew/discussions/155
I wondered that we should install and pin with clang-format 17 in https://apt.llvm.org/
But this will make developers on macOS unhapppy, if we always follow the latest clang-format, it will make developers on other platforms unhappy too.
Any better idea are welcome.