[PATCH] D33589: clang-format: consider not splitting tokens in optimization

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 19 05:02:21 PDT 2017


djasper added a comment.

I think doing the computation twice is fine. Or at least, I'd need a test case where it actually shows substantial overhead before doing what you are doing here. Understand that creating more States and making the State object itself larger also has cost and that cost occurs in the combinatorial exploration of the solution space. Doing an additional computation at the end should be comparatively cheap. Look at it this way: During the exploration of the solution space, we might enter breakProtrudingToken many times for the same comment. One more time during reconstruction of the solution is not that harmful.


https://reviews.llvm.org/D33589





More information about the cfe-commits mailing list