[PATCH] D19031: clang-format: Flexible line endings

Cameron via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 14:27:25 PDT 2016


cameron314 added a comment.

Too late ;-) We've successfully integrated it as the engine behind our auto-formatting feature, passing only the minimal context necessary.
We tried at first to supply the full file context, but that turned out to be much too slow in larger files. (We did a fair bit of testing with some of the real code our users have written.)

We can, of course, change the newlines on the IDE side instead (indeed, we already have a few transforms on both the input and output). But it seemed to us that it would make more sense to have ClangFormat generate the correct newlines in the first place given that this is what it already attempts to do with its newline detection feature. And we felt this minor extension would be useful to others.


http://reviews.llvm.org/D19031





More information about the cfe-commits mailing list