================ @@ -3107,29 +3131,15 @@ void UnwrappedLineParser::parseNamespace() { DeclarationScopeStack.size() > 1) ? 1u : 0u; - bool ManageWhitesmithsBraces = - AddLevels == 0u && - Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths; - - // If we're in Whitesmiths mode, indent the brace if we're not indenting - // the whole block. - if (ManageWhitesmithsBraces) - ++Line->Level; - - // Munch the semicolon after a namespace. This is more common than one would - // think. Putting the semicolon into its own line is very ugly. - parseBlock(/*MustBeDeclaration=*/true, AddLevels, /*MunchSemi=*/true, - /*KeepBraces=*/true, /*IfKind=*/nullptr, - ManageWhitesmithsBraces); - - addUnwrappedLine(AddLevels > 0 ? LineLevel::Remove : LineLevel::Keep); - - if (ManageWhitesmithsBraces) - --Line->Level; + parseNamespaceOrExportBlock(AddLevels); } // FIXME: Add error handling. } +void UnwrappedLineParser::parseCXXExportBlock() { + parseNamespaceOrExportBlock(Style.ExportBlockIndentation ? 1 : 0); ---------------- HazardyKnusperkeks wrote:
```suggestion parseNamespaceOrExportBlock(/*AddLevels=*/Style.ExportBlockIndentation ? 1 : 0); ``` https://github.com/llvm/llvm-project/pull/110381 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits