[PATCH] D120282: [Format] Remove unused LineContainsContinuedForLoopSection. NFC
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 22 01:01:03 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG48dc980847b2: [Format] Remove unused LineContainsContinuedForLoopSection. NFC (authored by sammccall).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120282/new/
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 &&
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120282.410468.patch
Type: text/x-patch
Size: 1869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220222/6ccdc276/attachment.bin>
More information about the cfe-commits
mailing list