-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
$ cat foo.c
#define PETSC_FIRST_ARG(args) PETSC_FIRST_ARG_ args
#define PETSC_SELECT_16TH(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, ...) a16
#define PETSC_NUM(...) PETSC_SELECT_16TH(__VA_ARGS__, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, ONE, throwaway)
#define PETSC_REST_HELPER_TWOORMORE(first, ...) , __VA_ARGS__$ clang-format --style=file:clang-format.txt foo.c
#define PETSC_FIRST_ARG(args) PETSC_FIRST_ARG_ args
#define PETSC_SELECT_16TH(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, ...) a16
#define PETSC_NUM(...) PETSC_SELECT_16TH(__VA_ARGS__, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, ONE, throwaway)
#define PETSC_REST_HELPER_TWOORMORE(first, ...) , __VA_ARGS__$ clang-format-22 --style=file:clang-format.txt foo.c
#define PETSC_FIRST_ARG(args) PETSC_FIRST_ARG_ args
#define PETSC_SELECT_16TH(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, ...) a16
#define PETSC_NUM(...) PETSC_SELECT_16TH(__VA_ARGS__, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, ONE, throwaway)
#define PETSC_REST_HELPER_TWOORMORE(first, ...) , __VA_ARGS__
$ clang-format-22 --version
Debian clang-format version 22.0.0 (++20251023101038+4ec5852c1d9f-1~exp1~20251023221217.3185)Is there a way to go back to the pre-22 behavior? clang-format.txt
Metadata
Metadata
Assignees
Labels
clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!