Skip to content

Commit 11b8795

Browse files
[clang-format][NFC] Fix comment grammer in ContinuationIndenter
Now all comments (for which id makes sense) end with a punctuation. Differential Revision: https://reviews.llvm.org/D135866
1 parent 440005b commit 11b8795

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clang/lib/Format/ContinuationIndenter.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
444444
}
445445

446446
// If the template declaration spans multiple lines, force wrap before the
447-
// function/class declaration
447+
// function/class declaration.
448448
if (Previous.ClosesTemplateDeclaration && CurrentState.BreakBeforeParameter &&
449449
Current.CanBreakBefore) {
450450
return true;
@@ -552,7 +552,7 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
552552

553553
// If the return type spans multiple lines, wrap before the function name.
554554
if (((Current.is(TT_FunctionDeclarationName) &&
555-
// Don't break before a C# function when no break after return type
555+
// Don't break before a C# function when no break after return type.
556556
(!Style.isCSharp() ||
557557
Style.AlwaysBreakAfterReturnType != FormatStyle::RTBS_None) &&
558558
// Don't always break between a JavaScript `function` and the function
@@ -1308,7 +1308,7 @@ static bool hasNestedBlockInlined(const FormatToken *Previous,
13081308
if (Previous->ParameterCount > 1)
13091309
return true;
13101310

1311-
// Also a nested block if contains a lambda inside function with 1 parameter
1311+
// Also a nested block if contains a lambda inside function with 1 parameter.
13121312
return Style.BraceWrapping.BeforeLambdaBody && Current.is(TT_LambdaLSquare);
13131313
}
13141314

@@ -1530,7 +1530,7 @@ void ContinuationIndenter::moveStatePastFakeLParens(LineState &State,
15301530
Previous->is(TT_ConditionalExpr))) &&
15311531
!Newline) {
15321532
// If BreakBeforeBinaryOperators is set, un-indent a bit to account for
1533-
// the operator and keep the operands aligned
1533+
// the operator and keep the operands aligned.
15341534
if (Style.AlignOperands == FormatStyle::OAS_AlignAfterOperator)
15351535
NewParenState.UnindentOperator = true;
15361536
// Mark indentation as alignment if the expression is aligned.
@@ -1722,7 +1722,7 @@ void ContinuationIndenter::moveStatePastScopeOpener(LineState &State,
17221722

17231723
if (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr &&
17241724
Current.is(tok::l_paren)) {
1725-
// Search for any parameter that is a lambda
1725+
// Search for any parameter that is a lambda.
17261726
FormatToken const *next = Current.Next;
17271727
while (next != nullptr) {
17281728
if (next->is(TT_LambdaLSquare)) {
@@ -2542,7 +2542,7 @@ ContinuationIndenter::breakProtrudingToken(const FormatToken &Current,
25422542
}
25432543

25442544
unsigned ContinuationIndenter::getColumnLimit(const LineState &State) const {
2545-
// In preprocessor directives reserve two chars for trailing " \"
2545+
// In preprocessor directives reserve two chars for trailing " \".
25462546
return Style.ColumnLimit - (State.Line->InPPDirective ? 2 : 0);
25472547
}
25482548

0 commit comments

Comments
 (0)