After all these years, having the two functions now serves to confuse
people.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
No objections here, but I need to see other patches to understand where it takes us before accepting.
clang/lib/Format/TokenAnnotator.cpp | ||
---|---|---|
3069 | I'd kept the name spaceRequiredBetween. |
This just made a 300 lines function and a 500 line function with minimal comments into a 800 line function.. For no real benefit?
Because from what I can tell you haven't worked on small clang-format issues you won't know that I often put a breakpoint in the spaceRequiredBetween, if it calls out into that function I now know where its covered.
I think if you had fixed a miriade of issues like "I want a space between @ and {" then you would have understood why breaking the 800 lines at least in 2 can be helpful even a little.
I know its not idea, but I'm not sure that the first step I'd make is to join 2 functions to make one massive function, for me my greatest frustration is the lack of comments and the if statements that have about 8 different clauses..
A better developer than me once said "Deal with the case you want and get out"...
By the way, last time I used a breakpoint on spaceRequiredBefore and stepped until return.
I think you can spin it any number of ways, but bottom line its a massive truth table and I sort of feel however you change it, it will just become a different equally incomprehensible pattern.
For me I'd prefer to stick with the devil I know, unless its broken, but as there are no unit tests my assumption is its not broken.
I'd kept the name spaceRequiredBetween.