[MAINT] Change clang-format for pre-commit#289
Conversation
also adds .clang-format and moves to clang-format-22
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s C/C++ formatting tooling by switching the pre-commit clang-format hook to pre-commit/mirrors-clang-format, introducing a project .clang-format configuration, and reformatting existing headers accordingly.
Changes:
- Switch pre-commit clang-format hook source and upgrade to clang-format 22.
- Add a repository-wide
.clang-formatfile and reformat affected headers. - Record the formatting commit in
.git-blame-ignore-revs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
mkl_fft/src/multi_iter.h |
clang-format reflow; touched iterator implementation code. |
mkl_fft/src/mklfft.h |
clang-format reflow of public C API declarations. |
.pre-commit-config.yaml |
Switch clang-format hook to mirrors-clang-format and bump version. |
.git-blame-ignore-revs |
Add ignore entry for the reformatting commit. |
.clang-format |
New formatting configuration used by clang-format/pre-commit. |
You can also share your feedback on Copilot code review. Take the survey.
| return 0; | ||
| else { | ||
| MultiIter_IndexElem(*mi, j) = 0; | ||
| if (!k) { |
There was a problem hiding this comment.
In multi_iter_masked_next, the termination condition inside the rollover branch is if (!k), but the loop invariant is k > 0, so this branch never sets MultiIter_Done(*mi). This makes the masked iterator inconsistent with multi_iter_next (which sets done on the final rollover) and prevents the fast-path if (MultiIter_Done(*mi)) return 1; from ever triggering. Consider setting done when the last masked dimension rolls over (e.g., when k == 1).
| if (!k) { | |
| if (k == 1) { |
5b14095 to
e6c3401
Compare
This PR proposes