[PATCH] D33238: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 17 05:41:39 PDT 2017


djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.

Are there cases where this makes a difference? If so, add a test. If not, add something to the patch description to clarify.



================
Comment at: lib/Format/TokenAnnotator.cpp:2473
 
   // If the last token before a '}', ']', or ')' is a comma or a trailing
   // comment, the intention is to insert a line break after it in order to make
----------------
Maybe add to the comment: "Import statements, especially in JavaScript, can be an exception to this rule."


https://reviews.llvm.org/D33238





More information about the cfe-commits mailing list