Before line comments were not touched at all with ColumnLimit == 0, so this is a real change. But at least for me it was unexpected that the comments were not fixed with ColumnLimit == 0.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
It seems to be a bug indeed.
So, basically all the changes are just adding a bunch of conditions on ColumnLimit != 0 which is a special value meaning "no limit", right? Or have I missed something?
Thining out loud... wouldn't it be easier to change ColumnLimit from 0 to numeric_limits<unsigned>::max() just before these transformations?
clang/lib/Format/ContinuationIndenter.cpp | ||
---|---|---|
2241 | Is this condition on ColumnLimit (and other below) working ok when ColumnLimit == 0? Do your tests cover it? |
clang/lib/Format/ContinuationIndenter.cpp | ||
---|---|---|
2241 | I must admit, that I don't know for sure. But I think your proposal of using ::max() is sound and should be used. |
Is this condition on ColumnLimit (and other below) working ok when ColumnLimit == 0? Do your tests cover it?