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/lib/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/lib/Format')
| -rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index c8e4cc4a1b6..e14b2b44e8e 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1430,6 +1430,8 @@ void UnwrappedLineParser::parseIfThenElse() { addUnwrappedLine(); ++Line->Level; parseStructuralElement(); + if (FormatTok->is(tok::eof)) + addUnwrappedLine(); --Line->Level; } } else if (NeedsUnwrappedLine) { |

