]> granicus.if.org Git - clang/commit
Initial support for formatting range-based for-loops.
authorDaniel Jasper <djasper@google.com>
Mon, 28 Jan 2013 13:21:16 +0000 (13:21 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 28 Jan 2013 13:21:16 +0000 (13:21 +0000)
commit3b9a8fc5bee5434bebc9058646896423adac625b
treecdd279c39783db887030aab7d65f8d56485d91b5
parentbfe6fd4f00257b113ea3bcb4efef8d9f9f245882
Initial support for formatting range-based for-loops.

Before (in good cases):
for (auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
     : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
for (auto aaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa,
aaaa)) {}

After:
for (auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa :
     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
for (auto aaaaaaaaaaaaaaaaaaaa :
     aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa, aaaa)) {}

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