]> granicus.if.org Git - clang/commit
clang-format: Improve selective formatting of nested statements.
authorDaniel Jasper <djasper@google.com>
Thu, 28 Nov 2013 15:58:55 +0000 (15:58 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 28 Nov 2013 15:58:55 +0000 (15:58 +0000)
commit4f6f1f82e1f5709ae6d51d5c68b9cf0ef9855e16
tree1f5d74d21dc04170e4f95d8a3c74c259749de608
parentcc62d5d90ad591a3e8aeaa00a672702aa56f9584
clang-format: Improve selective formatting of nested statements.

Previously, clang-format could create quite corrupt formattings if
individual lines of nested blocks (e.g. in "DEBUG({})" or lambdas) were
used. With this patch, it tries to extend the formatted regions to leave
around some reasonable format without always formatting the entire
surrounding statement.

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