]> granicus.if.org Git - clang/commit
Format a line if a range in its leading whitespace was selected.
authorDaniel Jasper <djasper@google.com>
Mon, 4 Mar 2013 13:43:19 +0000 (13:43 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 4 Mar 2013 13:43:19 +0000 (13:43 +0000)
commit1eee6c4269af28eb4e3500de7fc39c1eb8b26aa3
treee7f9fe5d413c438122fa3ec1186d3fb9a625b4c2
parente3a2b81429d935e3cfafa4c3ad1b21b957653165
Format a line if a range in its leading whitespace was selected.

With [] marking the selected range, clang-format invoked on

    [  ]   int a;

Would so far not reformat anything. With this patch, it formats a
line if its leading whitespace is touched.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176435 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/Format.cpp
lib/Format/UnwrappedLineParser.h
unittests/Format/FormatTest.cpp