[clang-tidy] Error when applying braces around single statement fix

Hi all,

I don’t know if this was reported before (I didn’t see anything online), but the fix for this checker breaks code.
For instance:

for(int i = 0; i < size; ++i)
for(int j = 0; j < size; ++j)
do(i, j);

is turned into:

for(int i = 0; i < size; ++i) {
for(int j = 0; j < size; ++j) {
do(i, j);

}

without the second (or third or fourth…) brace.
I suspect this is because the identical diags are removed? Is this expected behavior? Or is there a way to fix these?

Regards,

Matthieu

No one has a clue or cares about this issue?

See:
https://bugs.llvm.org/show_bug.cgi?id=32012#c6

Hope this helps,
S

Indeed, thanks… Seems like this big bug has not seen that much attention :frowning: