Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Format/BreakableToken.cpp | ||
---|---|---|
435 ↗ | (On Diff #107510) | I think I'd also enable this for at least Java. But tentatively I wonder - wouldn't just about every language do it like this for /** comments? |
436 ↗ | (On Diff #107510) | Wouldn't we also want to do this for /**blah, i.e. no whitespace after *? |
436 ↗ | (On Diff #107510) | Would we also want to do this for simple block comments, e.g. /*blah*/? That's a bit more tricky as they can be used inline, not sure about the corner cases there. |
606 ↗ | (On Diff #107510) | isn't this BreakPosition rather than length? |
unittests/Format/FormatTestJS.cpp | ||
136 ↗ | (On Diff #107510) | do you need a test where the entire comment block is indented? |
lib/Format/BreakableToken.cpp | ||
---|---|---|
435 ↗ | (On Diff #107510) | I agree for Java, but otherwise not. C++ is crazy with strange styles. |
436 ↗ | (On Diff #107510) | I explicitly check for a whitespace after the * to take care of strange stuff that is not javadoc, like ASCII art or lines like: /******** * #yolo */ I think we can decide for simple block comments later and leave them as-is for now. |
606 ↗ | (On Diff #107510) | It's both the BreakPosition and the BreakLength, because we're breaking starting from index 1. |
lib/Format/BreakableToken.cpp | ||
---|---|---|
436 ↗ | (On Diff #107510) | Makes sense. Maybe add some negative tests for such situations, to make sure we don't screw up the source? |