Lines Matching refs:ResultToks
122 SmallVectorImpl<Token> &ResultToks, bool HasPasteOperator, MacroInfo *Macro, in MaybeRemoveCommaBeforeVaArgs() argument
144 if (ResultToks.empty() || !ResultToks.back().is(tok::comma)) in MaybeRemoveCommaBeforeVaArgs()
149 PP.Diag(ResultToks.back().getLocation(), diag::ext_paste_comma); in MaybeRemoveCommaBeforeVaArgs()
152 ResultToks.pop_back(); in MaybeRemoveCommaBeforeVaArgs()
154 if (!ResultToks.empty()) { in MaybeRemoveCommaBeforeVaArgs()
159 if (ResultToks.back().is(tok::hashhash)) in MaybeRemoveCommaBeforeVaArgs()
160 ResultToks.pop_back(); in MaybeRemoveCommaBeforeVaArgs()
163 ResultToks.back().setFlag(Token::CommaAfterElided); in MaybeRemoveCommaBeforeVaArgs()
174 SmallVector<Token, 128> ResultToks; in ExpandFunctionArguments() local
217 ResultToks.push_back(Res); in ExpandFunctionArguments()
226 !ResultToks.empty() && ResultToks.back().is(tok::hashhash); in ExpandFunctionArguments()
237 ResultToks.push_back(CurTok); in ExpandFunctionArguments()
240 ResultToks.back().setFlag(Token::LeadingSpace); in ExpandFunctionArguments()
243 ResultToks.back().clearFlag(Token::LeadingSpace); in ExpandFunctionArguments()
257 MaybeRemoveCommaBeforeVaArgs(ResultToks, in ExpandFunctionArguments()
278 unsigned FirstResult = ResultToks.size(); in ExpandFunctionArguments()
280 ResultToks.append(ResultArgToks, ResultArgToks+NumToks); in ExpandFunctionArguments()
287 ResultToks.back().is(tok::comma)) in ExpandFunctionArguments()
288 ResultToks.back().setFlag(Token::IgnoredComma); in ExpandFunctionArguments()
292 for (unsigned i = FirstResult, e = ResultToks.size(); i != e; ++i) { in ExpandFunctionArguments()
293 Token &Tok = ResultToks[i]; in ExpandFunctionArguments()
300 ResultToks.begin()+FirstResult, in ExpandFunctionArguments()
301 ResultToks.end()); in ExpandFunctionArguments()
307 ResultToks[FirstResult].setFlagValue(Token::LeadingSpace, in ExpandFunctionArguments()
309 ResultToks[FirstResult].setFlagValue(Token::StartOfLine, false); in ExpandFunctionArguments()
324 if (NonEmptyPasteBefore && ResultToks.size() >= 2 && in ExpandFunctionArguments()
325 ResultToks[ResultToks.size()-2].is(tok::comma) && in ExpandFunctionArguments()
329 PP.Diag(ResultToks.pop_back_val().getLocation(), diag::ext_paste_comma); in ExpandFunctionArguments()
332 ResultToks.append(ArgToks, ArgToks+NumToks); in ExpandFunctionArguments()
336 for (unsigned i = ResultToks.size() - NumToks, e = ResultToks.size(); in ExpandFunctionArguments()
338 Token &Tok = ResultToks[i]; in ExpandFunctionArguments()
345 ResultToks.end()-NumToks, ResultToks.end()); in ExpandFunctionArguments()
359 ResultToks[ResultToks.size()-NumToks].setFlag(Token::LeadingSpace); in ExpandFunctionArguments()
381 assert(ResultToks.back().is(tok::hashhash)); in ExpandFunctionArguments()
382 ResultToks.pop_back(); in ExpandFunctionArguments()
390 MaybeRemoveCommaBeforeVaArgs(ResultToks, in ExpandFunctionArguments()
399 NumTokens = ResultToks.size(); in ExpandFunctionArguments()
402 Tokens = PP.cacheMacroExpandedTokens(this, ResultToks); in ExpandFunctionArguments()