Author: Manuel Klimek Date: 2023-04-21T11:59:45Z New Revision: 9e9e096ae95b9a41bf855cda01963a65313e9560
URL: https://github.com/llvm/llvm-project/commit/9e9e096ae95b9a41bf855cda01963a65313e9560 DIFF: https://github.com/llvm/llvm-project/commit/9e9e096ae95b9a41bf855cda01963a65313e9560.diff LOG: [clang-format] Fix dropped 'else'. 'else' was dropped accidentally in 398cddf6acec. Patch by Jared Grubb. Differential revision: https://reviews.llvm.org/D146310 Added: Modified: clang/lib/Format/UnwrappedLineFormatter.cpp Removed: ################################################################################ diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp index b545fa02cefb..ee0de2c8e20d 100644 --- a/clang/lib/Format/UnwrappedLineFormatter.cpp +++ b/clang/lib/Format/UnwrappedLineFormatter.cpp @@ -511,10 +511,9 @@ class LineJoiner { 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