Lines Matching refs:ResultToks
125 SmallVectorImpl<Token> &ResultToks, bool HasPasteOperator, MacroInfo *Macro, in MaybeRemoveCommaBeforeVaArgs() argument
147 if (ResultToks.empty() || !ResultToks.back().is(tok::comma)) in MaybeRemoveCommaBeforeVaArgs()
152 PP.Diag(ResultToks.back().getLocation(), diag::ext_paste_comma); in MaybeRemoveCommaBeforeVaArgs()
155 ResultToks.pop_back(); in MaybeRemoveCommaBeforeVaArgs()
161 if (!ResultToks.empty() && ResultToks.back().is(tok::hashhash)) in MaybeRemoveCommaBeforeVaArgs()
162 ResultToks.pop_back(); in MaybeRemoveCommaBeforeVaArgs()
173 SmallVector<Token, 128> ResultToks; in ExpandFunctionArguments() local
216 ResultToks.push_back(Res); in ExpandFunctionArguments()
225 !ResultToks.empty() && ResultToks.back().is(tok::hashhash); in ExpandFunctionArguments()
236 ResultToks.push_back(CurTok); in ExpandFunctionArguments()
239 ResultToks.back().setFlag(Token::LeadingSpace); in ExpandFunctionArguments()
242 ResultToks.back().clearFlag(Token::LeadingSpace); in ExpandFunctionArguments()
256 MaybeRemoveCommaBeforeVaArgs(ResultToks, in ExpandFunctionArguments()
277 unsigned FirstResult = ResultToks.size(); in ExpandFunctionArguments()
279 ResultToks.append(ResultArgToks, ResultArgToks+NumToks); in ExpandFunctionArguments()
286 ResultToks.back().is(tok::comma)) in ExpandFunctionArguments()
287 ResultToks.back().setFlag(Token::IgnoredComma); in ExpandFunctionArguments()
291 for (unsigned i = FirstResult, e = ResultToks.size(); i != e; ++i) { in ExpandFunctionArguments()
292 Token &Tok = ResultToks[i]; in ExpandFunctionArguments()
299 ResultToks.begin()+FirstResult, in ExpandFunctionArguments()
300 ResultToks.end()); in ExpandFunctionArguments()
306 ResultToks[FirstResult].setFlagValue(Token::LeadingSpace, in ExpandFunctionArguments()
322 if (NonEmptyPasteBefore && ResultToks.size() >= 2 && in ExpandFunctionArguments()
323 ResultToks[ResultToks.size()-2].is(tok::comma) && in ExpandFunctionArguments()
327 PP.Diag(ResultToks.pop_back_val().getLocation(), diag::ext_paste_comma); in ExpandFunctionArguments()
330 ResultToks.append(ArgToks, ArgToks+NumToks); in ExpandFunctionArguments()
334 for (unsigned i = ResultToks.size() - NumToks, e = ResultToks.size(); in ExpandFunctionArguments()
336 Token &Tok = ResultToks[i]; in ExpandFunctionArguments()
343 ResultToks.end()-NumToks, ResultToks.end()); in ExpandFunctionArguments()
357 ResultToks[ResultToks.size()-NumToks].setFlag(Token::LeadingSpace); in ExpandFunctionArguments()
379 assert(ResultToks.back().is(tok::hashhash)); in ExpandFunctionArguments()
380 ResultToks.pop_back(); in ExpandFunctionArguments()
388 MaybeRemoveCommaBeforeVaArgs(ResultToks, in ExpandFunctionArguments()
399 NumTokens = ResultToks.size(); in ExpandFunctionArguments()
402 Tokens = PP.cacheMacroExpandedTokens(this, ResultToks); in ExpandFunctionArguments()