r184896 - Run clang-format on lib/Format code after r184894. No other changes.
Nico Weber
nicolasweber at gmx.de
Tue Jun 25 17:30:14 PDT 2013
Author: nico
Date: Tue Jun 25 19:30:14 2013
New Revision: 184896
URL: http://llvm.org/viewvc/llvm-project?rev=184896&view=rev
Log:
Run clang-format on lib/Format code after r184894. No other changes.
Modified:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=184896&r1=184895&r2=184896&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Tue Jun 25 19:30:14 2013
@@ -266,8 +266,8 @@ public:
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 @@ public:
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 @@ private:
// 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())
Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/TokenAnnotator.cpp?rev=184896&r1=184895&r2=184896&view=diff
==============================================================================
--- cfe/trunk/lib/Format/TokenAnnotator.cpp (original)
+++ cfe/trunk/lib/Format/TokenAnnotator.cpp Tue Jun 25 19:30:14 2013
@@ -30,7 +30,7 @@ public:
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 @@ private:
case tok::kw_while:
if (CurrentToken != NULL && CurrentToken->is(tok::l_paren)) {
next();
- if (!parseParens(/*LookForDecls=*/ true))
+ if (!parseParens(/*LookForDecls=*/true))
return false;
}
break;
Modified: cfe/trunk/lib/Format/UnwrappedLineParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/UnwrappedLineParser.cpp?rev=184896&r1=184895&r2=184896&view=diff
==============================================================================
--- cfe/trunk/lib/Format/UnwrappedLineParser.cpp (original)
+++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp Tue Jun 25 19:30:14 2013
@@ -200,7 +200,7 @@ void UnwrappedLineParser::parseFile() {
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 @@ void UnwrappedLineParser::parseLevel(boo
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 @@ void UnwrappedLineParser::parseBlock(boo
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 @@ void UnwrappedLineParser::parseStructura
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 @@ void UnwrappedLineParser::parseStructura
if (Style.BreakBeforeBraces == FormatStyle::BS_Linux ||
Style.BreakBeforeBraces == FormatStyle::BS_Stroustrup)
addUnwrappedLine();
- parseBlock(/*MustBeDeclaration=*/ false);
+ parseBlock(/*MustBeDeclaration=*/false);
addUnwrappedLine();
return;
}
@@ -706,9 +706,9 @@ void UnwrappedLineParser::parseParens()
{
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 @@ void UnwrappedLineParser::parseIfThenEls
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 @@ void UnwrappedLineParser::parseIfThenEls
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 @@ void UnwrappedLineParser::parseNamespace
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 @@ void UnwrappedLineParser::parseForOrWhil
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 @@ void UnwrappedLineParser::parseDoWhile()
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 @@ void UnwrappedLineParser::parseLabel() {
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 @@ void UnwrappedLineParser::parseSwitch()
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 @@ void UnwrappedLineParser::parseRecord()
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 @@ void UnwrappedLineParser::parseObjCInter
// 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 @@ void UnwrappedLineParser::addUnwrappedLi
E = Line->Tokens.end();
I != E; ++I) {
llvm::dbgs() << (*I)->Tok.getName() << " ";
-
}
llvm::dbgs() << "\n";
});
More information about the cfe-commits
mailing list