Lines Matching refs:Next

93   const FormatToken *AttrTok = Tok.Next->Next;  in isCppAttribute()
113 AttrTok = AttrTok->Next; in isCppAttribute()
195 const auto *Next = CurrentToken->Next; in parseAngle() local
203 if (Next && Next->is(tok::greater) && in parseAngle()
206 Next->getStartOfNonWhitespace().getLocWithOffset(-1)) { in parseAngle()
210 (!Next || !Next->isOneOf(tok::l_paren, tok::l_brace))) { in parseAngle()
231 if (Next && Next->Tok.isLiteral()) in parseAngle()
477 if (LookForDecls && CurrentToken->Next) { in parseParens()
481 FormatToken *Next = CurrentToken->Next; in parseParens() local
484 CurrentToken->is(tok::identifier) && Next->isNot(tok::equal)) { in parseParens()
502 ProbablyFunctionType && CurrentToken->Next && in parseParens()
503 (CurrentToken->Next->is(tok::l_paren) || in parseParens()
504 (CurrentToken->Next->is(tok::l_square) && in parseParens()
506 OpeningParen.setType(OpeningParen.Next->is(tok::caret) in parseParens()
513 if (CurrentToken->Next && CurrentToken->Next->is(tok::l_brace) && in parseParens()
519 Tok = Tok->Next) { in parseParens()
565 if (CurrentToken->is(tok::comma) && CurrentToken->Next && in parseParens()
566 !CurrentToken->Next->HasUnescapedNewline && in parseParens()
567 !CurrentToken->Next->isTrailingComment()) { in parseParens()
571 (CurrentToken->is(tok::l_paren) && CurrentToken->Next && in parseParens()
572 CurrentToken->Next->isOneOf(tok::star, tok::amp, tok::caret)); in parseParens()
636 const FormatToken *AttrTok = Tok.Next; in isCSharpAttributeSpecifier()
646 AttrTok = AttrTok->Next; in isCSharpAttributeSpecifier()
652 AttrTok = AttrTok->Next; in isCSharpAttributeSpecifier()
664 if (AttrTok->Next && in isCSharpAttributeSpecifier()
665 AttrTok->Next->startsSequence(tok::identifier, tok::l_paren)) { in isCSharpAttributeSpecifier()
809 } else if (((CurrentToken->Next && in parseSquare()
810 CurrentToken->Next->is(tok::l_paren)) || in parseSquare()
837 if (CurrentToken->is(TT_ObjCMethodExpr) && CurrentToken->Next && in parseSquare()
838 CurrentToken->Next->is(TT_LambdaArrow)) { in parseSquare()
839 CurrentToken->Next->overwriteFixedType(TT_Unknown); in parseSquare()
937 if (CurrentToken->Next && in parseTableGenValue()
938 CurrentToken->Next->isOneOf(tok::colon, tok::semi, tok::l_brace)) { in parseTableGenValue()
1017 if (!Tok.Next || Tok.Next->is(tok::colon)) in isTableGenDAGArgBreakingOperator()
1438 } else if (canBeObjCSelectorComponent(*Tok->Previous) && Tok->Next && in consumeToken()
1439 (Tok->Next->isOneOf(tok::r_paren, tok::comma) || in consumeToken()
1440 (canBeObjCSelectorComponent(*Tok->Next) && Tok->Next->Next && in consumeToken()
1441 Tok->Next->Next->is(tok::colon)))) { in consumeToken()
1479 (Tok->Next && Tok->Next->is(tok::colon))) { in consumeToken()
1634 auto Next = CurrentToken->getNextNonComment(); in consumeToken() local
1635 if (!Next) in consumeToken()
1637 if (Next->is(tok::less)) in consumeToken()
1662 if (Style.isJavaScript() && Tok->Next && in consumeToken()
1663 Tok->Next->isOneOf(tok::semi, tok::comma, tok::colon, tok::r_paren, in consumeToken()
1683 if (Tok->Next && in consumeToken()
1684 (Tok->Next->startsSequence(tok::question, tok::r_paren) || in consumeToken()
1685 Tok->Next->startsSequence(tok::question, tok::greater) || in consumeToken()
1686 Tok->Next->startsSequence(tok::question, tok::identifier, in consumeToken()
1693 if (Tok->Next && Tok->Next->is(tok::identifier) && Tok->Next->Next && in consumeToken()
1694 Tok->Next->Next->is(tok::equal)) { in consumeToken()
1705 (!Tok->Next || in consumeToken()
1706 !Tok->Next->isOneOf(tok::identifier, tok::string_literal) || in consumeToken()
1707 !Tok->Next->Next || in consumeToken()
1708 !Tok->Next->Next->isOneOf(tok::colon, tok::question))) { in consumeToken()
1755 if (Style.isCSharp() && Tok->is(Keywords.kw_where) && Tok->Next && in consumeToken()
1756 Tok->Next->isNot(tok::l_paren)) { in consumeToken()
1767 (!Tok->Next || in consumeToken()
1768 !Tok->Next->isOneOf(tok::colon, tok::l_brace))) { in consumeToken()
1963 Info->getPPKeywordID() == tok::pp_import && CurrentToken->Next && in parseLine()
1964 CurrentToken->Next->isOneOf(tok::string_literal, tok::identifier, in parseLine()
2008 CurrentToken->is(Keywords.kw_from) && CurrentToken->Next && in parseLine()
2009 CurrentToken->Next->isStringLiteral()) { in parseLine()
2044 return Tok.TokenText == "goog" && Tok.Next && Tok.Next->is(tok::period) && in isClosureImportStatement()
2045 Tok.Next->Next && in isClosureImportStatement()
2046 (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement()
2047 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement()
2048 Tok.Next->Next->TokenText == "require" || in isClosureImportStatement()
2049 Tok.Next->Next->TokenText == "requireType" || in isClosureImportStatement()
2050 Tok.Next->Next->TokenText == "forwardDeclare") && in isClosureImportStatement()
2051 Tok.Next->Next->Next && Tok.Next->Next->Next->is(tok::l_paren); in isClosureImportStatement()
2089 CurrentToken = CurrentToken->Next; in next()
2295 Current = Current->Next; in untilMatchingParen()
2305 FormatToken *TemplateCloser = Current.Next->Next; in isDeductionGuide()
2321 TemplateCloser = TemplateCloser->Next; in isDeductionGuide()
2325 if (TemplateCloser && TemplateCloser->Next && in isDeductionGuide()
2326 TemplateCloser->Next->is(tok::semi) && in isDeductionGuide()
2334 LeadingIdentifier->TokenText == Current.Next->TokenText; in isDeductionGuide()
2364 if (Current.Next && in determineTokenType()
2365 Current.Next->isOneOf(TT_BinaryOperator, Keywords.kw_as)) { in determineTokenType()
2475 if (Current.MatchingParen && Current.Next && in determineTokenType()
2476 !Current.Next->isBinaryOperator() && in determineTokenType()
2477 !Current.Next->isOneOf( in determineTokenType()
2480 if (FormatToken *AfterParen = Current.MatchingParen->Next; in determineTokenType()
2494 } else if (Current.is(tok::at) && Current.Next && !Style.isJavaScript() && in determineTokenType()
2498 switch (Current.Next->Tok.getObjCKeywordID()) { in determineTokenType()
2692 const auto *AfterRParen = Tok.Next; in rParenEndsCast()
2837 for (const auto *Token = LParen->Next; Token != &Tok; Token = Token->Next) in rParenEndsCast()
2854 if (!AfterRParen->Next) in rParenEndsCast()
2868 !AfterRParen->Next->isOneOf(tok::identifier, tok::numeric_constant)) { in rParenEndsCast()
2873 (AfterRParen->Next->is(tok::numeric_constant) || Line.InPPDirective)) { in rParenEndsCast()
3379 Current = Current->Next; in next()
3383 Current = Current->Next; in next()
3417 FormatToken *Next = Tok->getNextNonComment(); in verilogGroupDecl() local
3422 Tok = Next; in verilogGroupDecl()
3427 Tok = Next; in verilogGroupDecl()
3433 Tok = Next; in verilogGroupDecl()
3440 } else if (!Next) { in verilogGroupDecl()
3446 if (Next->isOneOf( in verilogGroupDecl()
3463 if (Next->is(tok::l_paren)) in verilogGroupDecl()
3464 Next = Next->MatchingParen; in verilogGroupDecl()
3465 if (Next) in verilogGroupDecl()
3466 Tok = Next->getNextNonComment(); in verilogGroupDecl()
3564 for (const auto *Tok = Line.First; Tok; Tok = Tok->Next) in maxNestingDepth()
3601 Tok = Tok->Next; in getFunctionName()
3608 assert(Tok->Next); in getFunctionName()
3609 Tok = Tok->Next->Next; in getFunctionName()
3616 Tok = Tok->Next; in getFunctionName()
3711 [&LangOpts](const FormatToken *Next) -> const FormatToken * { in isFunctionDeclarationName() argument
3712 for (; Next; Next = Next->Next) { in isFunctionDeclarationName()
3713 if (Next->is(TT_OverloadedOperatorLParen)) in isFunctionDeclarationName()
3714 return Next; in isFunctionDeclarationName()
3715 if (Next->is(TT_OverloadedOperator)) in isFunctionDeclarationName()
3717 if (Next->isOneOf(tok::kw_new, tok::kw_delete)) { in isFunctionDeclarationName()
3719 if (Next->Next && in isFunctionDeclarationName()
3720 Next->Next->startsSequence(tok::l_square, tok::r_square)) { in isFunctionDeclarationName()
3721 Next = Next->Next->Next; in isFunctionDeclarationName()
3725 if (Next->startsSequence(tok::l_square, tok::r_square)) { in isFunctionDeclarationName()
3727 Next = Next->Next; in isFunctionDeclarationName()
3730 if ((Next->isTypeName(LangOpts) || Next->is(tok::identifier)) && in isFunctionDeclarationName()
3731 Next->Next && Next->Next->isPointerOrReference()) { in isFunctionDeclarationName()
3733 Next = Next->Next; in isFunctionDeclarationName()
3736 if (Next->is(TT_TemplateOpener) && Next->MatchingParen) { in isFunctionDeclarationName()
3737 Next = Next->MatchingParen; in isFunctionDeclarationName()
3746 const auto *Next = Current.Next; in isFunctionDeclarationName() local
3763 Next = skipOperatorName(Next); in isFunctionDeclarationName()
3767 for (; Next; Next = Next->Next) { in isFunctionDeclarationName()
3768 if (Next->is(TT_TemplateOpener) && Next->MatchingParen) { in isFunctionDeclarationName()
3769 Next = Next->MatchingParen; in isFunctionDeclarationName()
3770 } else if (Next->is(tok::coloncolon)) { in isFunctionDeclarationName()
3771 Next = Next->Next; in isFunctionDeclarationName()
3772 if (!Next) in isFunctionDeclarationName()
3774 if (Next->is(tok::kw_operator)) { in isFunctionDeclarationName()
3775 Next = skipOperatorName(Next->Next); in isFunctionDeclarationName()
3778 if (Next->isNot(tok::identifier)) in isFunctionDeclarationName()
3780 } else if (isCppAttribute(IsCpp, *Next)) { in isFunctionDeclarationName()
3781 Next = Next->MatchingParen; in isFunctionDeclarationName()
3782 if (!Next) in isFunctionDeclarationName()
3784 } else if (Next->is(tok::l_paren)) { in isFunctionDeclarationName()
3793 if (!Next || Next->isNot(tok::l_paren) || !Next->MatchingParen) in isFunctionDeclarationName()
3795 ClosingParen = Next->MatchingParen; in isFunctionDeclarationName()
3800 if (Next->Next == ClosingParen) in isFunctionDeclarationName()
3803 if (ClosingParen->Next && ClosingParen->Next->is(TT_PointerOrReference)) in isFunctionDeclarationName()
3816 if (IsCpp && Next->Next && Next->Next->is(tok::identifier) && in isFunctionDeclarationName()
3821 for (const FormatToken *Tok = Next->Next; Tok && Tok != ClosingParen; in isFunctionDeclarationName()
3822 Tok = Tok->Next) { in isFunctionDeclarationName()
3872 FormatToken *Current = First->Next; in calculateFormattingInformation()
3885 for (auto *Tok = Current; Tok; Tok = Tok->Next) { in calculateFormattingInformation()
3930 for (const auto *Tok = First; Tok; Tok = Tok->Next) { in calculateFormattingInformation()
3934 Tok = Tok->Next; in calculateFormattingInformation()
3939 for (Tok = Tok->Next; Tok && Tok != LeftParen->MatchingParen; in calculateFormattingInformation()
3940 Tok = Tok->Next) { in calculateFormattingInformation()
3943 auto *Next = Tok->Next; in calculateFormattingInformation() local
3945 Next && Next->isPointerOrReference() && Next->Next && in calculateFormattingInformation()
3946 Next->Next->is(tok::identifier); in calculateFormattingInformation()
3949 Next->setType(TT_BinaryOperator); in calculateFormattingInformation()
3950 Tok = Next; in calculateFormattingInformation()
3954 for (auto *Tok = ClosingParen->Next; Tok; Tok = Tok->Next) { in calculateFormattingInformation()
3963 const auto *Next = Tok->Next; in calculateFormattingInformation() local
3964 if (!Next || Next->isNot(tok::l_paren)) in calculateFormattingInformation()
3966 Tok = Next->MatchingParen; in calculateFormattingInformation()
4064 Current = Current->Next; in calculateFormattingInformation()
4069 for (Current = First; Current; Current = Current->Next) { in calculateFormattingInformation()
4112 if (CurrentToken->Next) in calculateArrayInitializerColumnList()
4113 CurrentToken->Next->MustBreakBefore = true; in calculateArrayInitializerColumnList()
4115 calculateInitializerColumnList(Line, CurrentToken->Next, Depth + 1); in calculateArrayInitializerColumnList()
4117 CurrentToken = CurrentToken->Next; in calculateArrayInitializerColumnList()
4130 CurrentToken = CurrentToken->Next; in calculateInitializerColumnList()
4136 CurrentToken = CurrentToken->Next; in calculateInitializerColumnList()
4177 if (Right.is(tok::identifier) && Right.Next && Right.Next->is(TT_DictLiteral)) in splitPenalty()
4248 (!Right.Next || Right.Next->isNot(tok::l_paren))) { in splitPenalty()
4457 Right.MatchingParen->Next && in spaceRequiredBetween()
4458 Right.MatchingParen->Next->is(tok::colon); in spaceRequiredBetween()
4515 if (Left.isTypeOrIdentifier(LangOpts) && Right.Next && Right.Next->Next && in spaceRequiredBetween()
4516 Right.Next->Next->is(TT_RangeBasedForLoopColon)) { in spaceRequiredBetween()
4558 if (BeforeLeft && BeforeLeft->isTypeOrIdentifier(LangOpts) && Right.Next && in spaceRequiredBetween()
4559 Right.Next->is(TT_RangeBasedForLoopColon)) { in spaceRequiredBetween()
4589 assert(Right.Next); in spaceRequiredBetween()
4590 const auto *LParen = Right.Next->MatchingParen; in spaceRequiredBetween()
4834 (!Right.Next || Right.Next->is(tok::semi))) { in spaceRequiredBetween()
5033 const FormatToken *Next = Right.MatchingParen->getNextNonComment(); in spaceRequiredBefore() local
5036 if (Next && Next->is(TT_FatArrow)) in spaceRequiredBefore()
5155 const FormatToken *Next = Right.getNextNonComment(); in spaceRequiredBefore() local
5156 return !(Next && Next->is(tok::r_paren)); in spaceRequiredBefore()
5415 if (Right.Next && Right.Next->is(TT_StructuredBindingLSquare) && in spaceRequiredBefore()
5448 return Tok.MatchingParen && Tok.MatchingParen->Next && in IsFunctionArgument()
5449 Tok.MatchingParen->Next->isOneOf(tok::comma, tok::r_paren); in IsFunctionArgument()
5476 const auto *AfterRight = Right.Next; in mustBreakBefore()
5607 for (const auto *Tok = &Right; Tok; Tok = Tok->Next) { in mustBreakBefore()
5629 &Left != Right.MatchingParen->Next) { in mustBreakBefore()
5774 if (AccessSpecifier && FirstNonComment->Next && in mustBreakBefore()
5775 FirstNonComment->Next->is(tok::kw_enum)) { in mustBreakBefore()
5782 ((AccessSpecifier && FirstNonComment->Next && in mustBreakBefore()
5783 FirstNonComment->Next->is(Keywords.kw_interface)) || in mustBreakBefore()
5877 LBrace = LBrace->Next; in mustBreakBefore()
5879 LBrace = LBrace->Next; in mustBreakBefore()
5881 LBrace = LBrace->Next; in mustBreakBefore()
5895 (LBrace->Next && LBrace->Next->is(tok::r_brace)))) || in mustBreakBefore()
5982 const FormatToken *Next = Right.getNextNonComment(); in canBreakBefore() local
5990 if (!Next || Next->isNot(tok::colon)) in canBreakBefore()
6059 (!Right.Next || Right.Next->isNot(TT_FunctionDeclarationName))); in canBreakBefore()
6136 if (Right.is(TT_SelectorName) || (Right.is(tok::identifier) && Right.Next && in canBreakBefore()
6137 Right.Next->is(TT_ObjCMethodExpr))) { in canBreakBefore()
6217 auto Next = Right.Next; in canBreakBefore() local
6218 if (Next && Next->is(tok::r_paren)) in canBreakBefore()
6219 Next = Next->Next; in canBreakBefore()
6220 if (Next && Next->is(tok::l_paren)) in canBreakBefore()
6242 if (Right.is(tok::identifier) && Right.Next && Right.Next->is(TT_DictLiteral)) in canBreakBefore()
6298 return Right.Next && Right.Next->is(tok::l_paren); in canBreakBefore()
6332 if (!Tok->Next) in printDebugInfo()
6334 Tok = Tok->Next; in printDebugInfo()