]> granicus.if.org Git - clang/commit
[clang-format] Convert AlignEscapedNewlinesLeft to an enum, adding
authorDaniel Jasper <djasper@google.com>
Mon, 8 May 2017 15:08:00 +0000 (15:08 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 8 May 2017 15:08:00 +0000 (15:08 +0000)
commit6878143d92cd036e9916ff853b8bc522e6e118b7
treee6ba82b01f5387b6c15dcdb79ba4445e89eb9054
parentc7b6c9527a4ed79fee5bba10a0afb2215a9cbb27
[clang-format] Convert AlignEscapedNewlinesLeft to an enum, adding
DontAlign

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)

Patch by jtbandes. Thank you!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302428 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ClangFormatStyleOptions.rst
include/clang/Format/Format.h
lib/Format/Format.cpp
lib/Format/WhitespaceManager.cpp
unittests/Format/FormatTest.cpp
unittests/Format/FormatTestSelective.cpp