]> granicus.if.org Git - clang/commit
clang-format: Support labels in brace-less ifs.
authorDaniel Jasper <djasper@google.com>
Wed, 6 Apr 2016 15:02:46 +0000 (15:02 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 6 Apr 2016 15:02:46 +0000 (15:02 +0000)
commit077a1a709807f8427ba74139eed82d0204bb9b72
treecb3826aabd3e6e4b6d0732d64e9705f05da76bcd
parent80197c36b2df22b4605c7621c6dcdd5e5fbf7bff
clang-format: Support labels in brace-less ifs.

While I am not personally convinced about the usefulness of this
construct, we should break it.

Before:
  if (a) label:
  f();

After:
  if (a)
  label:
    f();

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