[PATCH] clang-format: Fix space in for-each macro definition.

strager strager.nds at gmail.com
Wed Jun 10 15:45:41 PDT 2015


I got this message from `arc diff`:

  Invalid Content Encoding (Non-UTF8)
  This diff includes a file which is not valid UTF-8 (it has invalid byte
  sequences). You can either stop this workflow and fix it, or continue. If you
  continue, this file will be marked as binary.
  
  You can learn more about how Phabricator handles character encodings (and how
  to configure encoding settings and detect and correct encoding problems) by
  reading 'User Guide: UTF-8 and Character Encoding' in the Phabricator
  documentation.
  
      AFFECTED FILE
      unittests/Format/FormatTest.cpp
  
      Do you want to mark this file as binary and continue? [Y/n]

That's why unittests/Format/FormatTest.cpp is marked as binary. *sigh*

Here's the git-diff:

  diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
  index 69d6cee..0c45f3b 100644
  --- a/unittests/Format/FormatTest.cpp
  +++ b/unittests/Format/FormatTest.cpp
  @@ -610,12 +610,20 @@ TEST_F(FormatTest, RangeBasedForLoops) {
   }
  
   TEST_F(FormatTest, ForEachLoops) {
  +  verifyFormat("#define foreach(x, y)\n"
  +               "#define Q_FOREACH(x, y)\n"
  +               "#define BOOST_FOREACH(x, y)\n"
  +               "#define UNKNOWN_FOREACH(x, y)\n");
     verifyFormat("void f() {\n"
                  "  foreach (Item *item, itemlist) {}\n"
                  "  Q_FOREACH (Item *item, itemlist) {}\n"
                  "  BOOST_FOREACH (Item *item, itemlist) {}\n"
                  "  UNKNOWN_FORACH(Item * item, itemlist) {}\n"
                  "}");
  +  verifyFormat("#define foreach (x, y)\n"
  +               "#define Q_FOREACH (x, y)\n"
  +               "#define BOOST_FOREACH (x, y)\n"
  +               "#define UNKNOWN_FOREACH (x, y)\n");
   }
  
   TEST_F(FormatTest, FormatsWhileLoop) {


http://reviews.llvm.org/D10266

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list