diff options
| author | Daniel Jasper <djasper@google.com> | 2016-05-19 06:30:48 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2016-05-19 06:30:48 +0000 |
| commit | 451544ab57dc5c8ec187d1ce7e1ddc049d4d1b76 (patch) | |
| tree | a0e1780c1d7f65731b866586e2d1b9ffbf0b6f05 /clang/unittests/Format | |
| parent | e2fab133133c4c652ca27b791805b158b9d0a20a (diff) | |
| download | bcm5719-llvm-451544ab57dc5c8ec187d1ce7e1ddc049d4d1b76.tar.gz bcm5719-llvm-451544ab57dc5c8ec187d1ce7e1ddc049d4d1b76.zip | |
clang-format: Fix incorrect indentation in last line of macro definition
Before:
#define MACRO(a) \
if (a) { \
f(); \
} else \
g()
After:
#define MACRO(a) \
if (a) { \
f(); \
} else \
g()
llvm-svn: 270028
Diffstat (limited to 'clang/unittests/Format')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index aec801ccc98..27379b7d6c7 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2767,6 +2767,12 @@ TEST_F(FormatTest, MacroDefinitionsWithIncompleteCode) { " case 1: \\\n" " case 2\n", getLLVMStyleWithColumns(20)); + verifyFormat("#define MACRO(a) \\\n" + " if (a) \\\n" + " f(); \\\n" + " else \\\n" + " g()", + getLLVMStyleWithColumns(18)); verifyFormat("#define A template <typename T>"); verifyIncompleteFormat("#define STR(x) #x\n" "f(STR(this_is_a_string_literal{));"); |

