clang-format: Make short case labels work with #ifs
authorDaniel Jasper <djasper@google.com>
Sun, 23 Nov 2014 21:45:03 +0000 (21:45 +0000)
committerDaniel Jasper <djasper@google.com>
Sun, 23 Nov 2014 21:45:03 +0000 (21:45 +0000)
commit79f226e780449291f5905fac05c0ae864068a28d
treeb116fb5f8e3f31bd2994d9e8133731eaf24ed818
parent325e486f9b249a2ff645afb8a4cb7caa36fcd239
clang-format: Make short case labels work with #ifs

Before:
  switch (a) {
  #if FOO
  case 0: return 0; #endif
  }

After:
  switch (a) {
  #if FOO
  case 0: return 0;
  #endif
  }

This fixed llvm.org/PR21544.

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