[clang-tools-extra] [clang-tidy] Add new check readability-trailing-comma (PR #173669)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 10 01:07:00 PST 2026
https://github.com/zeyi2 requested changes to this pull request.
I think I found an invalid fix-it:
```c++
#define COMMA ,
int broken_array[] = {
1
COMMA
};
```
The check suggests the following fix:
```
warning: initializer list should have a trailing comma [readability-trailing-comma]
13 | 1
| ^
| ,
```
I think the code after fix wont compile.
https://github.com/llvm/llvm-project/pull/173669
More information about the cfe-commits
mailing list