Lines Matching refs:FormatToken
40 static bool canBeObjCSelectorComponent(const FormatToken &Tok) { in canBeObjCSelectorComponent()
46 static bool isLambdaParameterList(const FormatToken *Left) { in isLambdaParameterList()
61 static bool isKeywordWithCondition(const FormatToken &Tok) { in isKeywordWithCondition()
88 const FormatToken &Previous = *CurrentToken->Previous; // The '<'. in parseAngle()
98 FormatToken *Left = CurrentToken->Previous; in parseAngle()
163 if (FormatToken *Previous = CurrentToken->getPreviousNonComment()) { in parseAngle()
200 FormatToken *Left = CurrentToken->Previous; in parseParens()
202 FormatToken *PrevNonComment = Left->getPreviousNonComment(); in parseParens()
216 if (FormatToken *MaybeSel = Left->Previous) { in parseParens()
306 FormatToken *PossibleObjCForInToken = nullptr; in parseParens()
313 FormatToken *Prev = CurrentToken->getPreviousNonComment(); in parseParens()
315 FormatToken *PrevPrev = Prev->getPreviousNonComment(); in parseParens()
316 FormatToken *Next = CurrentToken->Next; in parseParens()
348 for (FormatToken *Tok = Left; Tok != CurrentToken; Tok = Tok->Next) { in parseParens()
413 FormatToken *Tok = CurrentToken; in parseParens()
423 bool isCSharpAttributeSpecifier(const FormatToken &Tok) { in isCSharpAttributeSpecifier()
438 const FormatToken *AttrTok = Tok.Next; in isCSharpAttributeSpecifier()
474 bool isCpp11AttributeSpecifier(const FormatToken &Tok) { in isCpp11AttributeSpecifier()
481 const FormatToken *AttrTok = Tok.Next->Next; in isCpp11AttributeSpecifier()
513 FormatToken *Left = CurrentToken->Previous; in parseSquare()
515 FormatToken *Parent = Left->getPreviousNonComment(); in parseSquare()
676 FormatToken *Previous = CurrentToken->getPreviousNonComment(); in parseSquare()
717 FormatToken *Tok = CurrentToken; in parseSquare()
727 FormatToken *Left = CurrentToken->Previous; in parseBrace()
753 FormatToken *Previous = CurrentToken->getPreviousNonComment(); in parseBrace()
779 void updateParameterCount(FormatToken *Left, FormatToken *Current) { in updateParameterCount()
822 FormatToken *Tok = CurrentToken; in consumeToken()
863 if (FormatToken *Previous = Tok->getPreviousNonComment()) in consumeToken()
869 const FormatToken *BeforePrevious = Tok->Previous->Previous; in consumeToken()
900 FormatToken *Prev = Tok->getPreviousNonComment(); in consumeToken()
905 FormatToken *PrevPrev = Prev->getPreviousNonComment(); in consumeToken()
983 FormatToken *Previous = Tok->getPreviousNonComment(); in consumeToken()
1002 FormatToken *Previous = Tok->getPreviousNonComment(); in consumeToken()
1248 FormatToken *Tok = CurrentToken; in parsePreprocessorDirective()
1345 bool isClosureImportStatement(const FormatToken &Tok) { in isClosureImportStatement()
1358 void resetTokenMetadata(FormatToken *Token) { in resetTokenMetadata()
1405 FormatToken *FirstObjCSelectorName = nullptr;
1406 FormatToken *FirstStartOfName = nullptr;
1433 void modifyContext(const FormatToken &Current) { in modifyContext()
1445 for (FormatToken *Previous = Current.Previous; in modifyContext()
1478 for (FormatToken *Previous = Current.Previous; in modifyContext()
1496 static FormatToken *untilMatchingParen(FormatToken *Current) { in untilMatchingParen()
1511 static bool isDeductionGuide(FormatToken &Current) { in isDeductionGuide()
1516 FormatToken *TemplateCloser = Current.Next->Next; in isDeductionGuide()
1539 FormatToken *LeadingIdentifier = in isDeductionGuide()
1545 FormatToken *PriorLeadingIdentifier = LeadingIdentifier->Previous; in isDeductionGuide()
1560 void determineTokenType(FormatToken &Current) { in determineTokenType()
1678 if (FormatToken *AfterParen = Current.MatchingParen->Next) { in determineTokenType()
1681 if (FormatToken *BeforeParen = Current.MatchingParen->Previous) in determineTokenType()
1708 FormatToken *PreviousNoComment = Current.getPreviousNonComment(); in determineTokenType()
1742 const FormatToken &AtToken = *Current.Previous; in determineTokenType()
1743 const FormatToken *Previous = AtToken.getPreviousNonComment(); in determineTokenType()
1761 bool isStartOfName(const FormatToken &Tok) { in isStartOfName()
1773 FormatToken *PreviousNotConst = Tok.getPreviousNonComment(); in isStartOfName()
1801 bool rParenEndsCast(const FormatToken &Tok) { in rParenEndsCast()
1811 FormatToken *LeftOfParens = Tok.MatchingParen->getPreviousNonComment(); in rParenEndsCast()
1863 auto IsQualifiedPointerOrReference = [](FormatToken *T) { in rParenEndsCast()
1908 for (const FormatToken *Token = Tok.MatchingParen->Next; Token != &Tok; in rParenEndsCast()
1930 for (FormatToken *Prev = Tok.Previous; Prev != Tok.MatchingParen; in rParenEndsCast()
1939 TokenType determineStarAmpUsage(const FormatToken &Tok, bool IsExpression, in determineStarAmpUsage()
1948 const FormatToken *PrevToken = Tok.getPreviousNonComment(); in determineStarAmpUsage()
1952 const FormatToken *NextToken = Tok.getNextNonComment(); in determineStarAmpUsage()
1999 const FormatToken *NextNextToken = NextToken->getNextNonComment(); in determineStarAmpUsage()
2012 TokenType determinePlusMinusCaretUsage(const FormatToken &Tok) { in determinePlusMinusCaretUsage()
2013 const FormatToken *PrevToken = Tok.getPreviousNonComment(); in determinePlusMinusCaretUsage()
2037 TokenType determineIncrementUsage(const FormatToken &Tok) { in determineIncrementUsage()
2038 const FormatToken *PrevToken = Tok.getPreviousNonComment(); in determineIncrementUsage()
2051 FormatToken *CurrentToken;
2059 llvm::SmallPtrSet<FormatToken *, 16> NonTemplateLess;
2098 FormatToken *Start = Current; in parse()
2099 FormatToken *LatestOperator = nullptr; in parse()
2164 const FormatToken *NextNonComment = Current->getNextNonComment(); in getCurrentPrecedence()
2205 void addFakeParenthesis(FormatToken *Start, prec::Level Precedence) { in addFakeParenthesis()
2210 FormatToken *Previous = Current->Previous; in addFakeParenthesis()
2222 llvm::SmallVector<FormatToken *, 2> Tokens; in parseUnaryOperator()
2228 for (FormatToken *Token : llvm::reverse(Tokens)) in parseUnaryOperator()
2237 FormatToken *Start = Current; in parseConditionalExpr()
2261 FormatToken *Current;
2273 for (const FormatToken *Tok = (*I)->First; Tok; Tok = Tok->Next) { in setCommentLineLevels()
2345 static bool isFunctionDeclarationName(const FormatToken &Current, in isFunctionDeclarationName()
2347 auto skipOperatorName = [](const FormatToken *Next) -> const FormatToken * { in isFunctionDeclarationName()
2382 const FormatToken *Next = Current.Next; in isFunctionDeclarationName()
2423 for (const FormatToken *Tok = Next->Next; Tok && Tok != Next->MatchingParen; in isFunctionDeclarationName()
2474 FormatToken *Current = Line.First->Next; in calculateFormattingInformation()
2495 for (FormatToken *Parameter = Current->Previous; Parameter; in calculateFormattingInformation()
2523 FormatToken &LastOfChild = *Current->Previous->Children[0]->Last; in calculateFormattingInformation()
2527 const FormatToken *Prev = Current->Previous; in calculateFormattingInformation()
2581 FormatToken *Current = Line.Last; in calculateUnbreakableTailLengths()
2596 const FormatToken &Tok, in splitPenalty()
2598 const FormatToken &Left = *Tok.Previous; in splitPenalty()
2599 const FormatToken &Right = Tok; in splitPenalty()
2791 bool TokenAnnotator::spaceRequiredBeforeParens(const FormatToken &Right) const { in spaceRequiredBeforeParens()
2798 const FormatToken &Left, in spaceRequiredBetween()
2799 const FormatToken &Right) { in spaceRequiredBetween()
2878 FormatToken *TokenBeforeMatchingParen = in spaceRequiredBetween()
2931 const FormatToken *Previous = &Left; in spaceRequiredBetween()
2964 [](const FormatToken &LSquareTok, const FormatStyle &Style) { in spaceRequiredBetween()
3079 const FormatToken &Right) { in spaceRequiredBefore()
3080 const FormatToken &Left = *Right.Previous; in spaceRequiredBefore()
3211 const FormatToken *Next = Right.MatchingParen->getNextNonComment(); in spaceRequiredBefore()
3448 static bool isAllmanBrace(const FormatToken &Tok) { in isAllmanBrace()
3454 static bool IsFunctionArgument(const FormatToken &Tok) { in IsFunctionArgument()
3460 isItAnEmptyLambdaAllowed(const FormatToken &Tok, in isItAnEmptyLambdaAllowed()
3466 isItAInlineLambdaAllowed(const FormatToken &Tok, in isItAInlineLambdaAllowed()
3473 static bool isOneChildWithoutMustBreakBefore(const FormatToken &Tok) { in isOneChildWithoutMustBreakBefore()
3476 FormatToken *curElt = Tok.Children[0]->First; in isOneChildWithoutMustBreakBefore()
3484 static bool isAllmanLambdaBrace(const FormatToken &Tok) { in isAllmanLambdaBrace()
3490 const FormatToken &Tok, FormatStyle::ShortLambdaStyle ShortLambdaOption) { in isAllmanBraceIncludedBreakableLambda()
3502 const FormatToken &Right) { in mustBreakBefore()
3503 const FormatToken &Left = *Right.Previous; in mustBreakBefore()
3581 const FormatToken *BeforeClosingBrace = nullptr; in mustBreakBefore()
3726 FormatToken *LBrace = Right.Next; in mustBreakBefore()
3801 const FormatToken &Right) { in canBreakBefore()
3802 const FormatToken &Left = *Right.Previous; in canBreakBefore()
3819 const FormatToken *NonComment = Right.getPreviousNonComment(); in canBreakBefore()
3844 const FormatToken *Next = Right.getNextNonComment(); in canBreakBefore()
4094 const FormatToken *Tok = Line.First; in printDebugInfo()