Commit Graph

3 Commits

Author SHA1 Message Date
Bruno Ricci 7b5bddfd03
[clang] Partially revert "Disable a few formatting options for test/"
The changes to "AlignTrailingComments" and "CommentPragmas" did not
result in what I expected (just leave the special comments alone).

Instead now the following:
  void test() {
    int i; // expected-error
           // expected-warning
  }

is formatted into:
  void test() {
    int i; // expected-error
    // expected-warning
  }

which is even worse.
2020-07-21 14:53:37 +01:00
Bruno Ricci 13316a7705
[clang] Disable a few formatting options for test/
Hopefully this will make the bot a little less noisy. Rationale for each:

AlignTrailingComments: We don't want to force-align the various expected-error
                       and friends.

CommentPragmas:       Tell clang-format to leave the "// CHECK:" and the
                      "// expected-" alone.

AlwaysBreakTemplateDeclarations: Templates in tests often have no break between
                                 the template-head and the declaration.

Differential Revision: https://reviews.llvm.org/D83901
2020-07-19 17:07:24 +01:00
Daniel Jasper 7039f18d82 Add .clang-format without column limit to subdirectory tests/.
A column limit in the test folder can lead to trouble as the RUN, CHECK,
etc. comments can potentially be broken over multiple lines changing
their meaning. Without column limit, clang-format will simply keep the
test author's line breaks.

llvm-svn: 194248
2013-11-08 06:45:35 +00:00