clang-format: Handle comments in short case labels.
authorDaniel Jasper <djasper@google.com>
Fri, 21 Nov 2014 12:36:25 +0000 (12:36 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 21 Nov 2014 12:36:25 +0000 (12:36 +0000)
commitd081e88e79430c6aa716942beb800a804cd52546
treefecc7a6327450fbfada1a611c0806a2bae821132
parent77e1a0ad1fa5c71eef1f0a223cdf73615207121b
clang-format: Handle comments in short case labels.

With AllowShortCaseLabelsOnASingleLine set to true:
This gets now left unchanged:
  case 1:
    // comment
    return;

Whereas before it was changed into:
  case 1: // comment return;

This fixes llvm.org/PR21630.

llvm-svn: 222529
clang/lib/Format/Format.cpp
clang/unittests/Format/FormatTest.cpp