[PATCH] D32733: [clang-format] Convert AlignEscapedNewlinesLeft to an enum, adding DontAlign

Jacob Bandes-Storch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 1 23:11:59 PDT 2017


jtbandes created this revision.
Herald added a subscriber: klimek.

This converts the clang-format option `AlignEscapedNewlinesLeft` from a boolean to an enum, named `AlignEscapedNewlines`, with options `Left` (prev. `true`), `Right` (prev. `false`), and a new option `DontAlign`.

When set to `DontAlign`, the backslashes are placed just after the last token in each line:

  #define EXAMPLE \
      do { \
          int x = aaaaa; \
          int b; \
          int dddddddddd; \
      } while (0)


https://reviews.llvm.org/D32733

Files:
  include/clang/Format/Format.h
  lib/Format/Format.cpp
  lib/Format/WhitespaceManager.cpp
  unittests/Format/FormatTest.cpp
  unittests/Format/FormatTestSelective.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32733.97397.patch
Type: text/x-patch
Size: 11947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170502/fd075faf/attachment.bin>


More information about the cfe-commits mailing list