]> granicus.if.org Git - clang/commit
Fixes various problems around enum parsing.
authorManuel Klimek <klimek@google.com>
Mon, 21 Jan 2013 19:17:52 +0000 (19:17 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 21 Jan 2013 19:17:52 +0000 (19:17 +0000)
commit308232c0aef773d24693f9e456dc3bc983934f7f
tree441a512bee7f7a452c664800ca3f0d16737e2e45
parentaabd094cf694039fe823987e133af7ac25cb9711
Fixes various problems around enum parsing.

Very similar to what we do for record definitions:
- tighten down what is an enum definition, so that we don't mistake a
  function for an enum
- allow common idioms around declarations (we'll want to handle that
  more centrally in the future)

We now correctly format:
enum X f() {
  a();
  return 42;
}

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