Lines Matching refs:Result

48   MacroArgs *Result;
51 Result = (MacroArgs*)malloc(sizeof(MacroArgs) +
54 new (Result) MacroArgs(UnexpArgTokens.size(), VarargsElided);
56 Result = *ResultEnt;
58 *ResultEnt = Result->ArgCache;
59 Result->NumUnexpArgTokens = UnexpArgTokens.size();
60 Result->VarargsElided = VarargsElided;
66 const_cast<Token*>(Result->getUnexpArgument(0)));
68 return Result;
117 const Token *Result = Start;
119 for (; Arg; ++Result) {
120 assert(Result < Start+NumUnexpArgTokens && "Invalid arg #");
121 if (Result->is(tok::eof))
124 assert(Result < Start+NumUnexpArgTokens && "Invalid arg #");
125 return Result;
156 std::vector<Token> &Result = PreExpArgTokens[Arg];
157 if (!Result.empty()) return Result;
164 // Otherwise, we have to pre-expand this argument, populating Result. To do
171 // Lex all of the macro-expanded tokens into Result.
173 Result.push_back(Token());
174 Token &Tok = Result.back();
176 } while (Result.back().isNot(tok::eof));
186 return Result;
206 SmallString<128> Result;
207 Result += "\"";
213 Result += ' ';
227 Result.append(Str.begin(), Str.end());
234 unsigned CurStrLen = Result.size();
235 Result.resize(CurStrLen+Tok.getLength());
236 const char *BufPtr = &Result[CurStrLen];
243 if (BufPtr != &Result[CurStrLen])
244 memcpy(&Result[CurStrLen], BufPtr, ActualTokLen);
248 Result.resize(CurStrLen+ActualTokLen);
255 if (Result.back() == '\\') {
258 unsigned FirstNonSlash = Result.size()-2;
260 while (Result[FirstNonSlash] == '\\')
262 if ((Result.size()-1-FirstNonSlash) & 1) {
265 Result.pop_back(); // remove one of the \'s.
268 Result += '"';
274 Result[0] = '\'';
275 Result[Result.size()-1] = '\'';
279 if (Result.size() == 3)
280 isBad = Result[1] == '\''; // ''' is not legal. '\' already fixed above.
282 isBad = (Result.size() != 4 || Result[1] != '\\'); // Not '\x'
286 Result = "' '"; // Use something arbitrary, but legal.
290 PP.CreateString(Result, Tok,