[PATCH] D19031: clang-format: Flexible line endings
Cameron via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 12 14:11:14 PDT 2016
cameron314 added a comment.
Sure :-)
The motivation behind this patch (and a few more upcoming ones) is to make ClangFormat (the library) more friendly for IDE integration (which is our primary use case), in particular for on-the-fly auto-formatting.
In an IDE auto-format setting, it's often the case that only fragments of the file at a time are being formatted. Often that means only a single line is passed as context. Or, sometimes, the file really is only one line to start with (e.g. formatting a file containing a one-line function declaration with the 'wrap after return type' option on needs to insert a newline).
http://reviews.llvm.org/D19031
More information about the cfe-commits
mailing list