Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upcodefmt shouldn't call FormatRanges with empty a:ranges #50
Labels
Comments
|
I think I would want some kind of empty check in the clang-format code regardless, because otherwise there's a correctness issue: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As noted in #48, we seem to have some cases where a formatter's
FormatRanges()will be invoked with an emptya:ranges. Either that, or we're unnecessarily checking for emptiness in the clang-format formatter.Unless I'm missing something, this doesn't seem like it's useful; the interface with formatters should say that this is impossible, and we should remove the checks we have.