Lines Matching full:tokens
55 Tokens = &*Macro->tokens_begin(); in Init()
66 assert(Tokens[0].getLocation().isValid()); in Init()
67 assert((Tokens[0].getLocation().isFileID() || Tokens[0].is(tok::comment)) && in Init()
72 // definition. Tokens that get lexed directly from the definition will in Init()
75 MacroDefStart = SM.getExpansionLoc(Tokens[0].getLocation()); in Init()
84 // Tokens to point to the expanded tokens. in Init()
106 Tokens = TokArray; in Init()
128 // the expanded tokens. in destroy()
130 delete [] Tokens; in destroy()
131 Tokens = nullptr; in destroy()
243 /// return preexpanded tokens from Tokens.
247 // Loop through 'Tokens', expanding them into ResultToks. Keep in ExpandFunctionArguments()
249 // we install the newly expanded sequence as the new 'Tokens' list. in ExpandFunctionArguments()
257 const Token &CurTok = Tokens[I]; in ExpandFunctionArguments()
264 if (I != 0 && !Tokens[I-1].is(tok::hashhash) && CurTok.hasLeadingSpace()) in ExpandFunctionArguments()
269 assert(Tokens[I + 1].is(tok::l_paren) && in ExpandFunctionArguments()
279 // We have entered into the __VA_OPT__ context, so handle tokens in ExpandFunctionArguments()
292 if (Tokens[I].is(tok::l_paren)) in ExpandFunctionArguments()
293 VCtx.sawOpeningParen(Tokens[I].getLocation()); in ExpandFunctionArguments()
294 // Continue skipping tokens within __VA_OPT__ if the macro was not in ExpandFunctionArguments()
298 if (!Tokens[I].is(tok::r_paren) || !VCtx.sawClosingParen()) { in ExpandFunctionArguments()
319 // Replace all the tokens just added from within VAOPT into a single in ExpandFunctionArguments()
321 // within these tokens. If either the contents of VAOPT were empty in ExpandFunctionArguments()
325 /*ClosingParenLoc*/ Tokens[I].getLocation()); in ExpandFunctionArguments()
327 } else if (/*No tokens within VAOPT*/ in ExpandFunctionArguments()
336 } else if ((I + 1 != E) && Tokens[I + 1].is(tok::hashhash)) { in ExpandFunctionArguments()
342 // that to now to avoid messing up our stashed count of tokens before in ExpandFunctionArguments()
356 Tokens[I + 1].is(tok::hashhash)) { in ExpandFunctionArguments()
372 int ArgNo = Macro->getParameterNum(Tokens[I+1].getIdentifierInfo()); in ExpandFunctionArguments()
373 assert((ArgNo != -1 || VCtx.isVAOptToken(Tokens[I + 1])) && in ExpandFunctionArguments()
386 getExpansionLocForMacroDefLoc(Tokens[I+1].getLocation()); in ExpandFunctionArguments()
409 bool PasteBefore = I != 0 && Tokens[I-1].is(tok::hashhash); in ExpandFunctionArguments()
410 bool PasteAfter = I+1 != E && Tokens[I+1].is(tok::hashhash); in ExpandFunctionArguments()
411 bool RParenAfter = I+1 != E && Tokens[I+1].is(tok::r_paren); in ExpandFunctionArguments()
448 // argument and substitute the expanded tokens into the result. This is in ExpandFunctionArguments()
459 ResultArgToks = ArgTok; // Use non-preexpanded tokens. in ExpandFunctionArguments()
487 // If any tokens were substituted from the argument, the whitespace in ExpandFunctionArguments()
510 // argument. It gets substituted as its non-pre-expanded tokens. in ExpandFunctionArguments()
516 // that __VA_ARGS__ expands to multiple tokens, avoid a pasting error when in ExpandFunctionArguments()
579 // (and we are still processing tokens within VA_OPT). We handle the case in ExpandFunctionArguments()
599 // If anything changed, install this as the new Tokens list. in ExpandFunctionArguments()
604 // The tokens will be added to Preprocessor's cache and will be removed in ExpandFunctionArguments()
606 Tokens = PP.cacheMacroExpandedTokens(this, ResultToks); in ExpandFunctionArguments()
608 // The preprocessor cache of macro expanded tokens owns these tokens,not us. in ExpandFunctionArguments()
613 /// Checks if two tokens form wide string literal.
644 Tok = Tokens[CurTokenIdx++]; in Lex()
650 // If this token is followed by a token paste (##) operator, paste the tokens! in Lex()
653 (Tokens[CurTokenIdx].is(tok::hashhash) || in Lex()
658 isWideStringLiteralFromMacro(Tok, Tokens[CurTokenIdx])))) { in Lex()
725 return pasteTokens(Tok, llvm::ArrayRef(Tokens, NumTokens), CurTokenIdx); in pasteTokens()
734 assert(CurIdx > 0 && "## can not be the first token within tokens"); in pasteTokens()
768 // the two tokens. in pasteTokens()
845 // If pasting the two tokens didn't form a full new token, this is an in pasteTokens()
928 // Out of tokens? in isNextTokenLParen()
931 return Tokens[CurTokenIdx].is(tok::l_paren); in isNextTokenLParen()
937 return Tokens[NumTokens-1].is(tok::eod) && !isAtEnd(); in isParsingPreprocessorDirective()
949 // tokens that have not been lexed yet, if any. in HandleMicrosoftCommentPaste()
978 /// Finds the tokens that are consecutive (from the same FileID)
983 /// for the 'foo', '==', 'bar' tokens will point inside that chunk.
986 /// consecutive tokens.
997 // The maximum distance between two consecutive tokens in a partition. in updateConsecutiveMacroArgTokens()
1006 // Partition the tokens by their FileID. in updateConsecutiveMacroArgTokens()
1010 // Consecutive tokens not written in macros must be from the same file. in updateConsecutiveMacroArgTokens()
1036 // For the consecutive tokens, find the length of the SLocEntry to contain in updateConsecutiveMacroArgTokens()
1041 // Create a macro expansion SLocEntry that will "contain" all of the tokens. in updateConsecutiveMacroArgTokens()
1053 // Change the location of the tokens from the spelling location to the new in updateConsecutiveMacroArgTokens()
1064 /// tokens to their new expanded locations.