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)
commit973c9420e14ab4aa815bdebc33451ae88395c6e8
treee8fc370d7b552e1291d04f41718507562d2dab91
parent3de6d3a2a067e79c46012527dae2cbff14ed32be
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.

llvm-svn: 176435
clang/lib/Format/Format.cpp
clang/lib/Format/UnwrappedLineParser.h
clang/unittests/Format/FormatTest.cpp