llvm-project/clang/unittests/Format
Krasimir Georgiev 3e05105486 [clang-format] Fix comment levels between '} else {' and PPDirective.
Summary:
This fixes a regression exposed by r307795 and rL308725 in which the level of a
comment line between '} else {' and a preprocessor directive is incorrectly set
as the level of the '} else {' line. For example, this :
```
int f(int i) {
  if (i) {
    ++i;
  } else {
    // comment
#ifdef A
    --i;
#endif
  }
}
```
was formatted as:
```
int f(int i) {
  if (i) {
    ++i;
  } else {
  // comment
#ifdef A
    --i;
#endif
  }
}
```

Reviewers: djasper, klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D35794

llvm-svn: 308882
2017-07-24 14:51:59 +00:00
..
CMakeLists.txt [clang-format] Support text proto messages 2017-07-03 15:05:14 +00:00
CleanupTest.cpp clang-format: [JS] do not clean up duplicated commas. 2017-05-29 08:41:11 +00:00
FormatTest.cpp Fix dereference of pointers in throw statements. 2017-07-17 15:27:53 +00:00
FormatTestComments.cpp [clang-format] Fix comment levels between '} else {' and PPDirective. 2017-07-24 14:51:59 +00:00
FormatTestJS.cpp [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs 2017-07-20 22:29:39 +00:00
FormatTestJava.cpp [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs 2017-07-20 22:29:39 +00:00
FormatTestObjC.cpp [clang-format] Remove unused using directive, NFC 2017-05-24 12:15:42 +00:00
FormatTestProto.cpp [clang-format] Add space between a message field key and the opening bracket in proto messages 2017-07-06 13:58:29 +00:00
FormatTestSelective.cpp [clang-format] Handle trailing comment sections in import statement lines 2017-05-19 10:34:57 +00:00
FormatTestTextProto.cpp [clang-format] Add space between a message field key and the opening bracket in proto messages 2017-07-06 13:58:29 +00:00
FormatTestUtils.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
NamespaceEndCommentsFixerTest.cpp clang-format: Add CompactNamespaces option 2017-06-14 12:29:47 +00:00
SortImportsTestJS.cpp clang-format: [JS] Correctly format JavaScript imports with long module paths 2017-07-18 14:00:19 +00:00
SortIncludesTest.cpp [clang-format] Switch to case-insensitive header matching and use it to 2017-06-29 23:20:54 +00:00
UsingDeclarationsSorterTest.cpp [clang-format] Support sorting using declarations 2017-06-21 12:03:12 +00:00