]> granicus.if.org Git - clang/commit
clang-format: Fix switch/case interaction with macros.
authorDaniel Jasper <djasper@google.com>
Thu, 25 Jul 2013 11:31:57 +0000 (11:31 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 25 Jul 2013 11:31:57 +0000 (11:31 +0000)
commite865cc5e183a25983bc79aca2c9bc9a6fb775ab2
treeaeb7b52256f9dd7cee86af844a9eeb3e5f51b929
parent8357746fe68cdc45052de4fc9d1d8b03e14ab900
clang-format: Fix switch/case interaction with macros.

Before:
  #define OPERATION_CASE(name) \
    case OP_name:              \
    return operations::Operation##name

  switch (OpCode) {
      CASE(Add);
      CASE(Subtract);
    default:
      return operations::Unknown;
  }

After:
  #define OPERATION_CASE(name) \
    case OP_name:              \
      return operations::Operation##name;

  switch (OpCode) {
    CASE(Add);
    CASE(Subtract);
    default:
      return operations::Unknown;
  }

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