bug 51926 identified an issue where a dangling comma caused the cell count to be to off by one
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
17805 | Here is no alignment, maybe add another case with another line? What happens if one line has the trailing comma and the next doesn't? |
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
17805 | yesh this is pretty ugly. In the second case it crashes. This isn't going to be fixed for a bit |
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
17805 | What is that bit? Now we can still revert the original change for LLVM 13 (at least I think so, since there are new RC Tags on GitHub), or can fix the crash. |
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
17805 | I think we should fix the crash since it’s only an issue with the dangling comma but if the consensus is we should revert then I can do that as well |
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
17805 | Totally agree, could you please add the test cases? The ones that crash you could comment out and fix afterwards. I don't know how much time we have before the next version is released. |
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
17805 | Let me see if I can fix the weirdness with the second test case but I'll time box it to two days so this doesn't drag out. I'd feel better about it not crashing just because we added an additional row. |
So I added in the second case but commented it out as it gets misformatted. However it doesn't assert which was the alarming outcome. I have one other bug to clean up here and I am going to open a bug to fix the line breaking after initial { in certain cases since the code there needs to be revisited. I am doing formatting in the info gathering loop where really I should add all that in the back end. But thats a bigger change that I'd like to do outside of mitigating this users crash.
By one other bug I mean an entirely separate bug that I will handle in a separate PR. Sorry if that was confusing.
Here is no alignment, maybe add another case with another line?
What happens if one line has the trailing comma and the next doesn't?