[PATCH] D21026: [clang-format] append newline after code when inserting new headers at the end of the code which does not end with newline.
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 10 01:41:13 PDT 2016
djasper added a comment.
Does this still work with the new Replacements?
================
Comment at: lib/Format/Format.cpp:1572
@@ +1571,3 @@
+ // When inserting headers at end of the code, also insert a '\n' at the end
+ // of the code if it does not ends with '\n'.
+ // The way of inserting '\n' is a bit of hack since we have no control over
----------------
"does not end"
================
Comment at: lib/Format/Format.cpp:1574
@@ +1573,3 @@
+ // The way of inserting '\n' is a bit of hack since we have no control over
+ // wether header insertions with the same offset (i.e. `Code.size()`) are
+ // inserted after the new line insertion ('\n' would actually be inserted
----------------
"whether"
https://reviews.llvm.org/D21026
More information about the cfe-commits
mailing list