Run clang-format on lib/Format code after r184894. No other changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184896 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index a81f9d0..ebcc26d 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -266,8 +266,8 @@
State.Column = FirstIndent;
State.NextToken = RootToken;
State.Stack.push_back(
- ParenState(FirstIndent, FirstIndent, /*AvoidBinPacking=*/ false,
- /*NoLineBreak=*/ false));
+ ParenState(FirstIndent, FirstIndent, /*AvoidBinPacking=*/false,
+ /*NoLineBreak=*/false));
State.LineContainsContinuedForLoopSection = false;
State.ParenLevel = 0;
State.StartOfStringLiteral = 0;
@@ -276,7 +276,7 @@
State.IgnoreStackForComparison = false;
// The first token has already been indented and thus consumed.
- moveStateToNextToken(State, /*DryRun=*/ false);
+ moveStateToNextToken(State, /*DryRun=*/false);
// If everything fits on a single line, just put it there.
unsigned ColumnLimit = Style.ColumnLimit;
@@ -955,8 +955,8 @@
// State already examined with lower penalty.
continue;
- addNextStateToQueue(Penalty, Node, /*NewLine=*/ false);
- addNextStateToQueue(Penalty, Node, /*NewLine=*/ true);
+ addNextStateToQueue(Penalty, Node, /*NewLine=*/false);
+ addNextStateToQueue(Penalty, Node, /*NewLine=*/true);
}
if (Queue.empty())
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp
index 681903b..4a94055 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/lib/Format/TokenAnnotator.cpp
@@ -30,7 +30,7 @@
AnnotatingParser(AnnotatedLine &Line, IdentifierInfo &Ident_in)
: Line(Line), CurrentToken(Line.First), KeywordVirtualFound(false),
NameFound(false), Ident_in(Ident_in) {
- Contexts.push_back(Context(tok::unknown, 1, /*IsExpression=*/ false));
+ Contexts.push_back(Context(tok::unknown, 1, /*IsExpression=*/false));
}
private:
@@ -315,7 +315,7 @@
case tok::kw_while:
if (CurrentToken != NULL && CurrentToken->is(tok::l_paren)) {
next();
- if (!parseParens(/*LookForDecls=*/ true))
+ if (!parseParens(/*LookForDecls=*/true))
return false;
}
break;
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 933da66..e1c1468 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -200,7 +200,7 @@
ScopedDeclarationState DeclarationState(
*Line, DeclarationScopeStack,
/*MustBeDeclaration=*/ !Line->InPPDirective);
- parseLevel(/*HasOpeningBrace=*/ false);
+ parseLevel(/*HasOpeningBrace=*/false);
// Make sure to format the remaining tokens.
flushComments(true);
addUnwrappedLine();
@@ -216,7 +216,7 @@
case tok::l_brace:
// FIXME: Add parameter whether this can happen - if this happens, we must
// be in a non-declaration context.
- parseBlock(/*MustBeDeclaration=*/ false);
+ parseBlock(/*MustBeDeclaration=*/false);
addUnwrappedLine();
break;
case tok::r_brace:
@@ -305,7 +305,7 @@
ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
MustBeDeclaration);
Line->Level += AddLevels;
- parseLevel(/*HasOpeningBrace=*/ true);
+ parseLevel(/*HasOpeningBrace=*/true);
if (!FormatTok->Tok.is(tok::r_brace)) {
Line->Level -= AddLevels;
@@ -525,7 +525,7 @@
if (FormatTok->Tok.is(tok::string_literal)) {
nextToken();
if (FormatTok->Tok.is(tok::l_brace)) {
- parseBlock(/*MustBeDeclaration=*/ true, 0);
+ parseBlock(/*MustBeDeclaration=*/true, 0);
addUnwrappedLine();
return;
}
@@ -571,7 +571,7 @@
if (Style.BreakBeforeBraces == FormatStyle::BS_Linux ||
Style.BreakBeforeBraces == FormatStyle::BS_Stroustrup)
addUnwrappedLine();
- parseBlock(/*MustBeDeclaration=*/ false);
+ parseBlock(/*MustBeDeclaration=*/false);
addUnwrappedLine();
return;
}
@@ -706,9 +706,9 @@
{
ScopedLineState LineState(*this);
ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
- /*MustBeDeclaration=*/ false);
+ /*MustBeDeclaration=*/false);
Line->Level += 1;
- parseLevel(/*HasOpeningBrace=*/ true);
+ parseLevel(/*HasOpeningBrace=*/true);
Line->Level -= 1;
}
nextToken();
@@ -734,7 +734,7 @@
parseParens();
bool NeedsUnwrappedLine = false;
if (FormatTok->Tok.is(tok::l_brace)) {
- parseBlock(/*MustBeDeclaration=*/ false);
+ parseBlock(/*MustBeDeclaration=*/false);
NeedsUnwrappedLine = true;
} else {
addUnwrappedLine();
@@ -745,7 +745,7 @@
if (FormatTok->Tok.is(tok::kw_else)) {
nextToken();
if (FormatTok->Tok.is(tok::l_brace)) {
- parseBlock(/*MustBeDeclaration=*/ false);
+ parseBlock(/*MustBeDeclaration=*/false);
addUnwrappedLine();
} else if (FormatTok->Tok.is(tok::kw_if)) {
parseIfThenElse();
@@ -769,7 +769,7 @@
if (Style.BreakBeforeBraces == FormatStyle::BS_Linux)
addUnwrappedLine();
- parseBlock(/*MustBeDeclaration=*/ true, 0);
+ parseBlock(/*MustBeDeclaration=*/true, 0);
// Munch the semicolon after a namespace. This is more common than one would
// think. Puttin the semicolon into its own line is very ugly.
if (FormatTok->Tok.is(tok::semi))
@@ -786,7 +786,7 @@
if (FormatTok->Tok.is(tok::l_paren))
parseParens();
if (FormatTok->Tok.is(tok::l_brace)) {
- parseBlock(/*MustBeDeclaration=*/ false);
+ parseBlock(/*MustBeDeclaration=*/false);
addUnwrappedLine();
} else {
addUnwrappedLine();
@@ -800,7 +800,7 @@
assert(FormatTok->Tok.is(tok::kw_do) && "'do' expected");
nextToken();
if (FormatTok->Tok.is(tok::l_brace)) {
- parseBlock(/*MustBeDeclaration=*/ false);
+ parseBlock(/*MustBeDeclaration=*/false);
} else {
addUnwrappedLine();
++Line->Level;
@@ -826,7 +826,7 @@
if (Line->Level > 1 || (!Line->InPPDirective && Line->Level > 0))
--Line->Level;
if (CommentsBeforeNextToken.empty() && FormatTok->Tok.is(tok::l_brace)) {
- parseBlock(/*MustBeDeclaration=*/ false);
+ parseBlock(/*MustBeDeclaration=*/false);
if (FormatTok->Tok.is(tok::kw_break))
parseStructuralElement(); // "break;" after "}" goes on the same line.
}
@@ -849,7 +849,7 @@
if (FormatTok->Tok.is(tok::l_paren))
parseParens();
if (FormatTok->Tok.is(tok::l_brace)) {
- parseBlock(/*MustBeDeclaration=*/ false, Style.IndentCaseLabels ? 2 : 1);
+ parseBlock(/*MustBeDeclaration=*/false, Style.IndentCaseLabels ? 2 : 1);
addUnwrappedLine();
} else {
addUnwrappedLine();
@@ -948,7 +948,7 @@
if (Style.BreakBeforeBraces == FormatStyle::BS_Linux)
addUnwrappedLine();
- parseBlock(/*MustBeDeclaration=*/ true);
+ parseBlock(/*MustBeDeclaration=*/true);
}
// We fall through to parsing a structural element afterwards, so
// class A {} n, m;
@@ -991,7 +991,7 @@
// If instance variables are present, keep the '{' on the first line too.
if (FormatTok->Tok.is(tok::l_brace))
- parseBlock(/*MustBeDeclaration=*/ true);
+ parseBlock(/*MustBeDeclaration=*/true);
// With instance variables, this puts '}' on its own line. Without instance
// variables, this ends the @interface line.
@@ -1027,7 +1027,6 @@
E = Line->Tokens.end();
I != E; ++I) {
llvm::dbgs() << (*I)->Tok.getName() << " ";
-
}
llvm::dbgs() << "\n";
});