Lines Matching refs:Next
245 if (LookForDecls && CurrentToken->Next) { in parseParens()
249 FormatToken *Next = CurrentToken->Next; in parseParens() local
252 CurrentToken->is(tok::identifier) && Next->isNot(tok::equal)) { in parseParens()
268 if (MightBeFunctionType && ProbablyFunctionType && CurrentToken->Next && in parseParens()
269 (CurrentToken->Next->is(tok::l_paren) || in parseParens()
270 (CurrentToken->Next->is(tok::l_square) && Line.MustBeDeclaration))) in parseParens()
271 Left->Type = Left->Next->is(tok::caret) ? TT_ObjCBlockLParen in parseParens()
276 if (CurrentToken->Next && CurrentToken->Next->is(tok::l_brace) && in parseParens()
281 for (FormatToken *Tok = Left; Tok != CurrentToken; Tok = Tok->Next) { in parseParens()
318 if (CurrentToken->is(tok::comma) && CurrentToken->Next && in parseParens()
319 !CurrentToken->Next->HasUnescapedNewline && in parseParens()
320 !CurrentToken->Next->isTrailingComment()) in parseParens()
355 const FormatToken *AttrTok = Tok.Next->Next; in isCpp11AttributeSpecifier()
374 AttrTok = AttrTok->Next; in isCpp11AttributeSpecifier()
498 else if (CurrentToken->Next && CurrentToken->Next->is(tok::l_paren) && in parseSquare()
746 } else if (canBeObjCSelectorComponent(*Tok->Previous) && Tok->Next && in consumeToken()
747 (Tok->Next->isOneOf(tok::r_paren, tok::comma) || in consumeToken()
748 (canBeObjCSelectorComponent(*Tok->Next) && Tok->Next->Next && in consumeToken()
749 Tok->Next->Next->is(tok::colon)))) { in consumeToken()
780 (Tok->Next && Tok->Next->is(tok::colon))) in consumeToken()
882 if (Style.Language == FormatStyle::LK_JavaScript && Tok->Next && in consumeToken()
883 Tok->Next->isOneOf(tok::semi, tok::comma, tok::colon, tok::r_paren, in consumeToken()
1050 CurrentToken->Next && in parseLine()
1051 CurrentToken->Next->isOneOf(tok::string_literal, tok::identifier, in parseLine()
1093 CurrentToken->is(Keywords.kw_from) && CurrentToken->Next && in parseLine()
1094 CurrentToken->Next->isStringLiteral()) in parseLine()
1121 return Tok.TokenText == "goog" && Tok.Next && Tok.Next->is(tok::period) && in isClosureImportStatement()
1122 Tok.Next->Next && in isClosureImportStatement()
1123 (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement()
1124 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement()
1125 Tok.Next->Next->TokenText == "require" || in isClosureImportStatement()
1126 Tok.Next->Next->TokenText == "requireType" || in isClosureImportStatement()
1127 Tok.Next->Next->TokenText == "forwardDeclare") && in isClosureImportStatement()
1128 Tok.Next->Next->Next && Tok.Next->Next->Next->is(tok::l_paren); in isClosureImportStatement()
1155 CurrentToken = CurrentToken->Next; in next()
1277 if (Current.Next && in determineTokenType()
1278 Current.Next->isOneOf(TT_BinaryOperator, Keywords.kw_as)) { in determineTokenType()
1348 if (Current.MatchingParen && Current.Next && in determineTokenType()
1349 !Current.Next->isBinaryOperator() && in determineTokenType()
1350 !Current.Next->isOneOf(tok::semi, tok::colon, tok::l_brace, in determineTokenType()
1353 if (FormatToken *AfterParen = Current.MatchingParen->Next) { in determineTokenType()
1364 } else if (Current.is(tok::at) && Current.Next && in determineTokenType()
1369 switch (Current.Next->Tok.getObjCKeywordID()) { in determineTokenType()
1480 if (Tok.Previous == Tok.MatchingParen || !Tok.Next || !Tok.MatchingParen) in rParenEndsCast()
1508 if (Tok.Next->is(tok::question)) in rParenEndsCast()
1513 if (Style.Language == FormatStyle::LK_Java && Tok.Next->is(tok::l_paren)) in rParenEndsCast()
1517 if (Tok.Next->isNot(tok::string_literal) && in rParenEndsCast()
1518 (Tok.Next->Tok.isLiteral() || in rParenEndsCast()
1519 Tok.Next->isOneOf(tok::kw_sizeof, tok::kw_alignof))) in rParenEndsCast()
1528 Tok.Next->isOneOf(tok::equal, tok::semi, tok::l_brace, tok::greater); in rParenEndsCast()
1540 for (const FormatToken *Token = Tok.MatchingParen->Next; Token != &Tok; in rParenEndsCast()
1541 Token = Token->Next) in rParenEndsCast()
1547 if (Tok.Next->isOneOf(tok::identifier, tok::kw_this)) in rParenEndsCast()
1550 if (!Tok.Next->Next) in rParenEndsCast()
1557 Tok.Next->isUnaryOperator() || Tok.Next->isOneOf(tok::amp, tok::star); in rParenEndsCast()
1558 if (!NextIsUnary || Tok.Next->is(tok::plus) || in rParenEndsCast()
1559 !Tok.Next->Next->isOneOf(tok::identifier, tok::numeric_constant)) in rParenEndsCast()
1881 Current = Current->Next; in next()
1885 Current = Current->Next; in next()
1902 for (const FormatToken *Tok = (*I)->First; Tok; Tok = Tok->Next) { in setCommentLineLevels()
1931 for (const auto *Tok = Line.First; Tok != nullptr; Tok = Tok->Next) in maxNestingDepth()
1973 auto skipOperatorName = [](const FormatToken *Next) -> const FormatToken * { in isFunctionDeclarationName() argument
1974 for (; Next; Next = Next->Next) { in isFunctionDeclarationName()
1975 if (Next->is(TT_OverloadedOperatorLParen)) in isFunctionDeclarationName()
1976 return Next; in isFunctionDeclarationName()
1977 if (Next->is(TT_OverloadedOperator)) in isFunctionDeclarationName()
1979 if (Next->isOneOf(tok::kw_new, tok::kw_delete)) { in isFunctionDeclarationName()
1981 if (Next->Next && Next->Next->is(tok::l_square) && Next->Next->Next && in isFunctionDeclarationName()
1982 Next->Next->Next->is(tok::r_square)) in isFunctionDeclarationName()
1983 Next = Next->Next->Next; in isFunctionDeclarationName()
1993 const FormatToken *Next = Current.Next; in isFunctionDeclarationName() local
1997 Next = skipOperatorName(Next); in isFunctionDeclarationName()
2001 for (; Next; Next = Next->Next) { in isFunctionDeclarationName()
2002 if (Next->is(TT_TemplateOpener)) { in isFunctionDeclarationName()
2003 Next = Next->MatchingParen; in isFunctionDeclarationName()
2004 } else if (Next->is(tok::coloncolon)) { in isFunctionDeclarationName()
2005 Next = Next->Next; in isFunctionDeclarationName()
2006 if (!Next) in isFunctionDeclarationName()
2008 if (Next->is(tok::kw_operator)) { in isFunctionDeclarationName()
2009 Next = skipOperatorName(Next->Next); in isFunctionDeclarationName()
2012 if (!Next->is(tok::identifier)) in isFunctionDeclarationName()
2014 } else if (Next->is(tok::l_paren)) { in isFunctionDeclarationName()
2023 if (!Next || !Next->is(tok::l_paren) || !Next->MatchingParen) in isFunctionDeclarationName()
2028 if (Next->Next == Next->MatchingParen) in isFunctionDeclarationName()
2031 if (Next->MatchingParen->Next && in isFunctionDeclarationName()
2032 Next->MatchingParen->Next->is(TT_PointerOrReference)) in isFunctionDeclarationName()
2034 for (const FormatToken *Tok = Next->Next; Tok && Tok != Next->MatchingParen; in isFunctionDeclarationName()
2035 Tok = Tok->Next) { in isFunctionDeclarationName()
2083 FormatToken *Current = Line.First->Next; in calculateFormattingInformation()
2166 Current = Current->Next; in calculateFormattingInformation()
2171 for (Current = Line.First; Current != nullptr; Current = Current->Next) { in calculateFormattingInformation()
2232 if (Right.is(tok::identifier) && Right.Next && Right.Next->is(TT_DictLiteral)) in splitPenalty()
2304 (!Right.Next || Right.Next->isNot(tok::l_paren))) { in splitPenalty()
2419 Right.MatchingParen && Right.MatchingParen->Next && in spaceRequiredBetween()
2420 Right.MatchingParen->Next->is(tok::colon); in spaceRequiredBetween()
2624 const FormatToken *Next = Right.MatchingParen->getNextNonComment(); in spaceRequiredBefore() local
2627 if (Next && Next->is(TT_JsFatArrow)) in spaceRequiredBefore()
2808 if (Right.Next && Right.Next->is(TT_StructuredBindingLSquare) && in spaceRequiredBefore()
2875 if (Right.is(tok::plus) && Left.is(tok::string_literal) && Right.Next && in mustBreakBefore()
2876 Right.Next->is(tok::string_literal)) in mustBreakBefore()
2917 if (Right.is(tok::lessless) && Right.Next && in mustBreakBefore()
2919 Right.Next->is(tok::string_literal)) in mustBreakBefore()
3001 Right.is(TT_SelectorName) && !Right.is(tok::r_square) && Right.Next) { in mustBreakBefore()
3010 FormatToken *LBrace = Right.Next; in mustBreakBefore()
3012 LBrace = LBrace->Next; in mustBreakBefore()
3014 LBrace = LBrace->Next; in mustBreakBefore()
3016 LBrace = LBrace->Next; in mustBreakBefore()
3030 (LBrace->Next && LBrace->Next->is(tok::r_brace)))) || in mustBreakBefore()
3074 auto Next = Comma->getNextNonComment(); in mustBreakBefore() local
3075 if (!Next) in mustBreakBefore()
3077 if (!Next->isOneOf(TT_LambdaLSquare, tok::l_brace, tok::caret)) in mustBreakBefore()
3122 const FormatToken* Next = Right.getNextNonComment(); in canBreakBefore() local
3130 if (!Next || !Next->is(tok::colon)) in canBreakBefore()
3175 (!Right.Next || Right.Next->isNot(TT_FunctionDeclarationName))); in canBreakBefore()
3246 if (Right.is(TT_SelectorName) || (Right.is(tok::identifier) && Right.Next && in canBreakBefore()
3247 Right.Next->is(TT_ObjCMethodExpr))) in canBreakBefore()
3303 if (Right.is(tok::identifier) && Right.Next && Right.Next->is(TT_DictLiteral)) in canBreakBefore()
3371 if (!Tok->Next) in printDebugInfo()
3373 Tok = Tok->Next; in printDebugInfo()