Home | History | Annotate | Download | only in Lex

Lines Matching refs:Macro

24 /// Create a TokenLexer for the specified macro with the specified actual
31 Macro = PP.getMacroInfo(Tok.getIdentifierInfo());
39 Tokens = &*Macro->tokens_begin();
42 NumTokens = Macro->tokens_end()-Macro->tokens_begin();
51 "Macro defined in macro?");
54 // Reserve a source location entry chunk for the length of the macro
59 MacroDefLength = Macro->getDefinitionLength(SM);
66 // If this is a function-like macro, expand the arguments and change
68 if (Macro->isFunctionLike() && Macro->getNumArgs())
71 // Mark the macro as currently disabled, so that it is not recursively
72 // expanded. The macro must be disabled only after argument pre-expansion of
73 // function-like macro arguments occurs.
74 Macro->DisableMacro();
87 Macro = 0;
109 // If this was a function-like macro that actually uses its arguments, delete
121 /// Expand the arguments of a function-like macro so that we can quickly
139 // preprocessor already verified that the following token is a macro name
143 int ArgNo = Macro->getArgumentNum(Tokens[i+1].getIdentifierInfo());
179 int ArgNo = II ? Macro->getArgumentNum(II) : -1;
211 ResultArgToks = &ActualArgs->getPreExpArgument(ArgNo, Macro, PP)[0];
261 (unsigned)ArgNo == Macro->getNumArgs()-1 &&
262 Macro->isVariadic()) {
284 // If this token (the macro argument) was supposed to get leading
288 // Do not do this if the paste operator occurs before the macro argument,
322 // and if the macro had at least one real argument, and if the token before
324 if ((unsigned)ArgNo == Macro->getNumArgs()-1 && // is __VA_ARGS__
352 // The preprocessor cache of macro expanded tokens owns these tokens,not us.
357 /// Lex - Lex and return a token from this macro stream.
360 // Lexing off the end of the macro, pop this macro off the expansion stack.
362 // If this is a macro (not a token stream), mark the macro enabled now
364 if (Macro) Macro->EnableMacro();
389 // Note that ## is a normal token when not expanding a macro.
390 if (!isAtEnd() && Tokens[CurToken].is(tok::hashhash) && Macro) {
421 // match the lexical properties of the macro identifier.
436 // from a macro expansion.
616 /// isNextTokenLParen - If the next token lexed will pop this macro off the
634 /// macro, other active macros, and anything left on the current physical
638 // We 'comment out' the rest of this macro by just ignoring the rest of the
641 // Since this must be a macro, mark the macro enabled now that it is no longer
643 assert(Macro && "Token streams can't paste comments");
644 Macro->EnableMacro();
649 /// \brief If \arg loc is a file ID and points inside the current macro
651 /// macro expansion source location entry, otherwise it returns an invalid
661 "Expected loc to come from the macro definition");
716 // Create a macro expansion SLocEntry that will "contain" all of the tokens.
730 /// \brief Creates SLocEntries and updates the locations of macro argument
733 /// \param ArgIdDefLoc the location of the macro argument id inside the macro
735 /// \param Tokens the macro argument tokens to update.