llvm-project/clang/unittests/Format
Krasimir Georgiev 6a1c9d51fa [clang-format] Fix regression about short functions after #else
Summary:
This patch fixes a regression introduced in r312904, where the formatter confuses
the `else` in `#else` with an `else` of an `if-else` statement.
For example, formatting this code with google style
```
#ifdef A
int f() {}
#else
int f() {}
#endif
```
resulted in
```
#ifdef A
int f() {}
#else
int f() {
}
#endif
```

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: klimek, cfe-commits

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

llvm-svn: 314683
2017-10-02 15:53:37 +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 [clang-format] Fix regression about short functions after #else 2017-10-02 15:53:37 +00:00
FormatTestComments.cpp [clang-format] Emit absolute splits before lines for comments, try 2 2017-08-24 16:41:10 +00:00
FormatTestJS.cpp clang-format: [JS] wrap and indent `goog.setTestOnly` calls. 2017-09-11 15:22:52 +00:00
FormatTestJava.cpp clang-format/java: Unbreak genenrics formatting after r299952. 2017-09-27 17:57:50 +00:00
FormatTestObjC.cpp [clang-format] Remove unused using directive, NFC 2017-05-24 12:15:42 +00:00
FormatTestProto.cpp [clang-format] Fix indent of 'key <...>' and 'key {...}' in text protos 2017-08-03 14:17: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] Fix indent of 'key <...>' and 'key {...}' in text protos 2017-08-03 14:17:29 +00:00
FormatTestUtils.h clang-format: Add preprocessor directive indentation 2017-08-30 14:34:57 +00:00
NamespaceEndCommentsFixerTest.cpp clang-format: fix block OpeningLineIndex around preprocessor 2017-07-28 07:56:14 +00:00
SortImportsTestJS.cpp clang-format: [JS] support default imports. 2017-08-01 15:54:43 +00:00
SortIncludesTest.cpp [clang-format] Do not format likely xml 2017-08-29 13:51:38 +00:00
UsingDeclarationsSorterTest.cpp [clang-format] Ignore case and stable sort using-declarations 2017-09-22 04:48:17 +00:00