This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. HazardyKnusperkeks marked an inline comment as done. Closed by commit rGce7356f08194: [clang-format] Don't eat two semicolons after namespace (authored by HazardyKnusperkeks).
Changed prior to commit: https://reviews.llvm.org/D138373?vs=476724&id=539472#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138373/new/ https://reviews.llvm.org/D138373 Files: clang/lib/Format/UnwrappedLineParser.cpp Index: clang/lib/Format/UnwrappedLineParser.cpp =================================================================== --- clang/lib/Format/UnwrappedLineParser.cpp +++ clang/lib/Format/UnwrappedLineParser.cpp @@ -2970,15 +2970,12 @@ 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); - // Munch the semicolon after a namespace. This is more common than one would - // think. Putting the semicolon into its own line is very ugly. - if (FormatTok->is(tok::semi)) - nextToken(); - addUnwrappedLine(AddLevels > 0 ? LineLevel::Remove : LineLevel::Keep); if (ManageWhitesmithsBraces)
Index: clang/lib/Format/UnwrappedLineParser.cpp =================================================================== --- clang/lib/Format/UnwrappedLineParser.cpp +++ clang/lib/Format/UnwrappedLineParser.cpp @@ -2970,15 +2970,12 @@ 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); - // Munch the semicolon after a namespace. This is more common than one would - // think. Putting the semicolon into its own line is very ugly. - if (FormatTok->is(tok::semi)) - nextToken(); - addUnwrappedLine(AddLevels > 0 ? LineLevel::Remove : LineLevel::Keep); if (ManageWhitesmithsBraces)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits