sammccall created this revision. sammccall added a reviewer: MyDeveloperDay. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D120282 Files: clang/lib/Format/ContinuationIndenter.cpp clang/lib/Format/ContinuationIndenter.h Index: clang/lib/Format/ContinuationIndenter.h =================================================================== --- clang/lib/Format/ContinuationIndenter.h +++ clang/lib/Format/ContinuationIndenter.h @@ -419,9 +419,6 @@ /// The token that needs to be next formatted. FormatToken *NextToken; - /// \c true if this line contains a continued for-loop section. - bool LineContainsContinuedForLoopSection; - /// \c true if \p NextToken should not continue this line. bool NoContinuation; @@ -468,9 +465,6 @@ return NextToken < Other.NextToken; if (Column != Other.Column) return Column < Other.Column; - if (LineContainsContinuedForLoopSection != - Other.LineContainsContinuedForLoopSection) - return LineContainsContinuedForLoopSection; if (NoContinuation != Other.NoContinuation) return NoContinuation; if (StartOfLineLevel != Other.StartOfLineLevel) Index: clang/lib/Format/ContinuationIndenter.cpp =================================================================== --- clang/lib/Format/ContinuationIndenter.cpp +++ clang/lib/Format/ContinuationIndenter.cpp @@ -253,7 +253,6 @@ State.Stack.push_back(ParenState(/*Tok=*/nullptr, FirstIndent, FirstIndent, /*AvoidBinPacking=*/false, /*NoLineBreak=*/false)); - State.LineContainsContinuedForLoopSection = false; State.NoContinuation = false; State.StartOfStringLiteral = 0; State.StartOfLineLevel = 0; @@ -343,8 +342,6 @@ return true; if (CurrentState.BreakBeforeClosingParen && Current.is(tok::r_paren)) return true; - if (Previous.is(tok::semi) && State.LineContainsContinuedForLoopSection) - return true; if (Style.Language == FormatStyle::LK_ObjC && Style.ObjCBreakBeforeNestedBlockParam && Current.ObjCSelectorNameParts > 1 &&
Index: clang/lib/Format/ContinuationIndenter.h =================================================================== --- clang/lib/Format/ContinuationIndenter.h +++ clang/lib/Format/ContinuationIndenter.h @@ -419,9 +419,6 @@ /// The token that needs to be next formatted. FormatToken *NextToken; - /// \c true if this line contains a continued for-loop section. - bool LineContainsContinuedForLoopSection; - /// \c true if \p NextToken should not continue this line. bool NoContinuation; @@ -468,9 +465,6 @@ return NextToken < Other.NextToken; if (Column != Other.Column) return Column < Other.Column; - if (LineContainsContinuedForLoopSection != - Other.LineContainsContinuedForLoopSection) - return LineContainsContinuedForLoopSection; if (NoContinuation != Other.NoContinuation) return NoContinuation; if (StartOfLineLevel != Other.StartOfLineLevel) Index: clang/lib/Format/ContinuationIndenter.cpp =================================================================== --- clang/lib/Format/ContinuationIndenter.cpp +++ clang/lib/Format/ContinuationIndenter.cpp @@ -253,7 +253,6 @@ State.Stack.push_back(ParenState(/*Tok=*/nullptr, FirstIndent, FirstIndent, /*AvoidBinPacking=*/false, /*NoLineBreak=*/false)); - State.LineContainsContinuedForLoopSection = false; State.NoContinuation = false; State.StartOfStringLiteral = 0; State.StartOfLineLevel = 0; @@ -343,8 +342,6 @@ return true; if (CurrentState.BreakBeforeClosingParen && Current.is(tok::r_paren)) return true; - if (Previous.is(tok::semi) && State.LineContainsContinuedForLoopSection) - return true; if (Style.Language == FormatStyle::LK_ObjC && Style.ObjCBreakBeforeNestedBlockParam && Current.ObjCSelectorNameParts > 1 &&
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits