diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp --- a/clang/lib/Format/UnwrappedLineFormatter.cpp +++ b/clang/lib/Format/UnwrappedLineFormatter.cpp @@ -60,7 +60,7 @@ // Update the indent level cache size so that we can rely on it // having the right size in adjustToUnmodifiedline. skipLine(Line, /*UnknownIndent=*/true); - if (Line.InPPDirective || + if ((Line.InPPDirective && !Line.InMacroBody) || (Style.IndentPPDirectives == FormatStyle::PPDIS_BeforeHash && Line.Type == LT_CommentAbovePPDirective)) { unsigned IndentWidth =