]> granicus.if.org Git - clang/commit
Fixes formatting of nested brace initializers.
authorManuel Klimek <klimek@google.com>
Mon, 14 Jan 2013 16:41:43 +0000 (16:41 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 14 Jan 2013 16:41:43 +0000 (16:41 +0000)
commit2c7739e3cbf1357c0ef8d894045a300331053565
tree7a315176ce512187e231fc46e1826a5baf16dd18
parent6f5bb2c93c31a7977382c5079d85db8ca3267cd0
Fixes formatting of nested brace initializers.

We now format this correctly:
Status::Rep Status::global_reps[3] = {
  { kGlobalRef, OK_CODE, NULL, NULL, NULL },
  { kGlobalRef, CANCELLED_CODE, NULL, NULL, NULL },
  { kGlobalRef, UNKNOWN_CODE, NULL, NULL, NULL }
};

- fixed a bug where BreakBeforeClosingBrace would be set on the wrong
  state
- added penalties for breaking between = and {, and between { and any
  other non-{ token

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