| Issue |
78965
|
| Summary |
[clang-format] Incorrectly formatted macro
|
| Labels |
clang-format
|
| Assignees |
|
| Reporter |
prj-
|
```C
$ cat foo.c
#define foo(i, j) (i - bar(j))
#define foo(i, j) ((i) - bar(j))
$ clang-format --version
clang-format version 17.0.6
$ clang-format foo.c
#define foo(i, j) (i - bar(j))
#define foo(i, j) ((i)-bar(j))
$ clang-format-18 --version
Debian clang-format version 18.0.0 (++20240119100743+cd05ade13a66-1~exp1~20240119220916.1830)
$ clang-format-18 foo.c
#define foo(i, j) (i - bar(j))
#define foo(i, j) ((i)-bar(j))
```
Shouldn't the proper output be the following?
```C
#define foo(i, j) (i - bar(j))
#define foo(i, j) ((i) - bar(j))
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs