summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-05-19 06:30:48 +0000
committerDaniel Jasper <djasper@google.com>2016-05-19 06:30:48 +0000
commit451544ab57dc5c8ec187d1ce7e1ddc049d4d1b76 (patch)
treea0e1780c1d7f65731b866586e2d1b9ffbf0b6f05 /clang/lib/Format
parente2fab133133c4c652ca27b791805b158b9d0a20a (diff)
downloadbcm5719-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.cpp2
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) {
OpenPOWER on IntegriCloud