[PATCH] D75034: [clang-format] use spaces for alignment with UT_ForContinuationAndIndentation

Maximilian Fickert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 28 03:46:46 PDT 2020


fickert added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:10146
                    "\t int i;\n"
                    "}"));
 
----------------
This test seems to be missing the tab configuration (`Tab`) as an argument to `format`, and the same test with missing `Tab` argument appears again in line 10337. Adding the `Tab` argument will also change the expected result. I think the test case here should look like this:

```
  EXPECT_EQ("{\n"
            "        /*\n"
            "         * Comment\n"
            "         */\n"
            "        int i;\n"
            "}",
            format("{\n"
                   "\t/*\n"
                   "\t * Comment\n"
                   "\t */\n"
                   "\t int i;\n"
                   "}",
                   Tab));
```

and a similar change should be made to the one in line 10337.

I assume this should be fixed in a separate commit?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75034/new/

https://reviews.llvm.org/D75034





More information about the cfe-commits mailing list