diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-07-10 21:35:27 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-07-10 21:35:27 +0000 |
commit | b660446bcf47bfbcdebaf65a6616c4046579987a (patch) | |
tree | a9282e02c0a13df4d99fd89b94d219f8b6109e7f /lib/Parse/ParseStmt.cpp | |
parent | e0e6b9e79a0c4edae92abd3928263875c78e23aa (diff) |
80-column violations and whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r-- | lib/Parse/ParseStmt.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index 39c46234f6..e13ce6b407 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -896,7 +896,7 @@ bool Parser::ParseParenExprOrCondition(ExprResult &ExprResult, // Otherwise the condition is valid or the rparen is present. T.consumeClose(); - + // Check for extraneous ')'s to catch things like "if (foo())) {". We know // that all callers are looking for a statement after the condition, so ")" // isn't valid. @@ -905,7 +905,7 @@ bool Parser::ParseParenExprOrCondition(ExprResult &ExprResult, << FixItHint::CreateRemoval(Tok.getLocation()); ConsumeParen(); } - + return false; } @@ -1259,7 +1259,7 @@ StmtResult Parser::ParseDoStatement() { // Parse the parenthesized condition. BalancedDelimiterTracker T(*this, tok::l_paren); T.consumeOpen(); - + // FIXME: Do not just parse the attribute contents and throw them away ParsedAttributesWithRange attrs(AttrFactory); MaybeParseCXX0XAttributes(attrs); @@ -1305,7 +1305,8 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) { return StmtError(); } - bool C99orCXXorObjC = getLangOpts().C99 || getLangOpts().CPlusPlus || getLangOpts().ObjC1; + bool C99orCXXorObjC = getLangOpts().C99 || getLangOpts().CPlusPlus || + getLangOpts().ObjC1; // C99 6.8.5p5 - In C99, the for statement is a block. This is not // the case for C90. Start the loop scope. @@ -1492,7 +1493,7 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) { // of an auto-typed loop variable. StmtResult ForRangeStmt; StmtResult ForEachStmt; - + if (ForRange) { ForRangeStmt = Actions.ActOnCXXForRangeStmt(ForLoc, T.getOpenLocation(), FirstPart.take(), @@ -1506,7 +1507,7 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) { } else if (ForEach) { ForEachStmt = Actions.ActOnObjCForCollectionStmt(ForLoc, T.getOpenLocation(), FirstPart.take(), - Collection.take(), + Collection.take(), T.getCloseLocation()); } @@ -1638,7 +1639,7 @@ StmtResult Parser::ParseReturnStatement() { } // needSpaceAsmToken - This function handles whitespace around asm punctuation. -// Returns true if a space should be emitted. +// Returns true if a space should be emitted. static inline bool needSpaceAsmToken(Token currTok) { static Token prevTok; @@ -1802,7 +1803,7 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) { for (unsigned i = 0, e = AsmToks.size(); i < e; ++i) { const char *ThisTokBuf = &TokenBuf[0]; bool StringInvalid = false; - unsigned ThisTokLen = + unsigned ThisTokLen = Lexer::getSpelling(AsmToks[i], ThisTokBuf, PP.getSourceManager(), PP.getLangOpts(), &StringInvalid); if (i && (!AsmLineNum || i != LineEnds[AsmLineNum-1]) && @@ -1846,7 +1847,8 @@ StmtResult Parser::ParseAsmStatement(bool &msAsm) { assert(Tok.is(tok::kw_asm) && "Not an asm stmt"); SourceLocation AsmLoc = ConsumeToken(); - if (getLangOpts().MicrosoftExt && Tok.isNot(tok::l_paren) && !isTypeQualifier()) { + if (getLangOpts().MicrosoftExt && Tok.isNot(tok::l_paren) && + !isTypeQualifier()) { msAsm = true; return ParseMicrosoftAsmStatement(AsmLoc); } @@ -2149,7 +2151,7 @@ StmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc) { return move(TryBlock); // Borland allows SEH-handlers with 'try' - + if ((Tok.is(tok::identifier) && Tok.getIdentifierInfo() == getSEHExceptKeyword()) || Tok.is(tok::kw___finally)) { @@ -2189,7 +2191,7 @@ StmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc) { if (Handlers.empty()) return StmtError(); - return Actions.ActOnCXXTryBlock(TryLoc, TryBlock.take(), move_arg(Handlers)); + return Actions.ActOnCXXTryBlock(TryLoc, TryBlock.take(),move_arg(Handlers)); } } @@ -2285,10 +2287,10 @@ void Parser::ParseMicrosoftIfExistsStatement(StmtVector &Stmts) { case IEB_Parse: // Parse the statements below. break; - + case IEB_Dependent: llvm_unreachable("Dependent case handled above"); - + case IEB_Skip: Braces.skipToEnd(); return; |