Don't remove all indentation when in #defines.
Otherwise, this can become hard to read.
Before: #define A \
case 1:
After: #define A \
case 1:
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177509 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index a438a53..b43cc07 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -574,7 +574,7 @@
return;
nextToken();
unsigned OldLineLevel = Line->Level;
- if (Line->Level > 0)
+ if (Line->Level > 1 || (!Line->InPPDirective && Line->Level > 0))
--Line->Level;
if (CommentsBeforeNextToken.empty() && FormatTok.Tok.is(tok::l_brace)) {
parseBlock(/*MustBeDeclaration=*/ false);