https://github.com/zeyi2 commented:

Personally, I agree with localspook's idea about multiple line checking.

e.g. Code that looks like this are very common
```c
int foo[] = {1, 2, 3};
```

but after this check, it may be transformed to:
```c
int foo[] = {1, 2, 3,};
```
I think the fix adds visual noise.

---

Also, (at first glance) multi line detection will not introduce a lot of new 
code, we can just check if `SM.getExpansionLineNumber(InitList->getBeginLoc())` 
and `SM.getExpansionLineNumber(InitList->getEndLoc())` gives the same value :)

https://github.com/llvm/llvm-project/pull/173669
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to