]> granicus.if.org Git - clang/commit
clang-format: Fix corner case in ObjC interface definitions.
authorDaniel Jasper <djasper@google.com>
Wed, 28 Aug 2013 08:04:23 +0000 (08:04 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 28 Aug 2013 08:04:23 +0000 (08:04 +0000)
commit7186ccc86ee5802c33886d6dd4c5386c7e9fd1aa
tree39e516c175292f5120a5466a6c9b01ff1d7cc890
parentf18bfd44c4fe4ab28c44eecb7aeed618bcf8f627
clang-format: Fix corner case in ObjC interface definitions.

In
  @implementation ObjcClass
  - (void)method;
  {
  }
  @end
the ObjC compiler seems to accept the superfluous comma after "method",
but clang-format used to assert on the subsequent "{".

This fixes llvm.org/PR16604.

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