jaredgrubb created this revision. jaredgrubb added a reviewer: klimek. jaredgrubb added a project: clang-format. Herald added a project: All. jaredgrubb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
A patch (398cddf6acec <https://reviews.llvm.org/rG398cddf6acecfb12b5997c2d639ee3cf31b787ad>) appears to have inadvertently removed an `else`. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D146310 Files: clang/lib/Format/UnwrappedLineFormatter.cpp Index: clang/lib/Format/UnwrappedLineFormatter.cpp =================================================================== --- clang/lib/Format/UnwrappedLineFormatter.cpp +++ clang/lib/Format/UnwrappedLineFormatter.cpp @@ -511,9 +511,9 @@ ShouldMerge = !Style.BraceWrapping.AfterClass || (NextLine.First->is(tok::r_brace) && !Style.BraceWrapping.SplitEmptyRecord); - } if(TheLine->InPPDirective || - !TheLine->First->isOneOf(tok::kw_class, tok::kw_enum, - tok::kw_struct)) { + } else if (TheLine->InPPDirective || + !TheLine->First->isOneOf(tok::kw_class, tok::kw_enum, + tok::kw_struct)) { // Try to merge a block with left brace unwrapped that wasn't yet // covered. ShouldMerge = !Style.BraceWrapping.AfterFunction ||
Index: clang/lib/Format/UnwrappedLineFormatter.cpp =================================================================== --- clang/lib/Format/UnwrappedLineFormatter.cpp +++ clang/lib/Format/UnwrappedLineFormatter.cpp @@ -511,9 +511,9 @@ ShouldMerge = !Style.BraceWrapping.AfterClass || (NextLine.First->is(tok::r_brace) && !Style.BraceWrapping.SplitEmptyRecord); - } if(TheLine->InPPDirective || - !TheLine->First->isOneOf(tok::kw_class, tok::kw_enum, - tok::kw_struct)) { + } else if (TheLine->InPPDirective || + !TheLine->First->isOneOf(tok::kw_class, tok::kw_enum, + tok::kw_struct)) { // Try to merge a block with left brace unwrapped that wasn't yet // covered. ShouldMerge = !Style.BraceWrapping.AfterFunction ||
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits