Lines Matching refs:ThisTokBuf
79 const char *&ThisTokBuf, in ProcessCharEscape() argument
84 const char *EscapeBegin = ThisTokBuf; in ProcessCharEscape()
87 ++ThisTokBuf; in ProcessCharEscape()
91 unsigned ResultChar = *ThisTokBuf++; in ProcessCharEscape()
106 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape()
112 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape()
133 if (ThisTokBuf == ThisTokEnd || !isHexDigit(*ThisTokBuf)) { in ProcessCharEscape()
135 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape()
143 for (; ThisTokBuf != ThisTokEnd; ++ThisTokBuf) { in ProcessCharEscape()
144 int CharVal = llvm::hexDigitValue(ThisTokBuf[0]); in ProcessCharEscape()
161 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape()
168 --ThisTokBuf; in ProcessCharEscape()
176 ResultChar |= *ThisTokBuf++ - '0'; in ProcessCharEscape()
178 } while (ThisTokBuf != ThisTokEnd && NumDigits < 3 && in ProcessCharEscape()
179 ThisTokBuf[0] >= '0' && ThisTokBuf[0] <= '7'); in ProcessCharEscape()
184 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape()
195 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape()
204 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape()
208 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape()
261 static bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, in ProcessUCNEscape() argument
267 const char *UcnBegin = ThisTokBuf; in ProcessUCNEscape()
270 ThisTokBuf += 2; in ProcessUCNEscape()
272 if (ThisTokBuf == ThisTokEnd || !isHexDigit(*ThisTokBuf)) { in ProcessUCNEscape()
274 Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, in ProcessUCNEscape()
275 diag::err_hex_escape_no_digits) << StringRef(&ThisTokBuf[-1], 1); in ProcessUCNEscape()
278 UcnLen = (ThisTokBuf[-1] == 'u' ? 4 : 8); in ProcessUCNEscape()
280 for (; ThisTokBuf != ThisTokEnd && UcnLenSave; ++ThisTokBuf, UcnLenSave--) { in ProcessUCNEscape()
281 int CharVal = llvm::hexDigitValue(ThisTokBuf[0]); in ProcessUCNEscape()
289 Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, in ProcessUCNEscape()
298 Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, in ProcessUCNEscape()
311 Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, in ProcessUCNEscape()
316 Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, in ProcessUCNEscape()
325 Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, in ProcessUCNEscape()
333 static int MeasureUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, in MeasureUCNEscape() argument
344 if (!ProcessUCNEscape(ThisTokBegin, ThisTokBuf, ThisTokEnd, UcnVal, in MeasureUCNEscape()
368 static void EncodeUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, in EncodeUCNEscape() argument
377 if (!ProcessUCNEscape(ThisTokBegin, ThisTokBuf, ThisTokEnd, UcnVal, UcnLen, in EncodeUCNEscape()
1352 const char *ThisTokBuf = &TokenBuf[0]; in init() local
1358 Lexer::getSpelling(StringToks[i], ThisTokBuf, SM, Features, in init()
1363 const char *ThisTokBegin = ThisTokBuf; in init()
1364 const char *ThisTokEnd = ThisTokBuf+ThisTokLen; in init()
1381 UDSuffixOffset = ThisTokEnd - ThisTokBuf; in init()
1413 if (ThisTokBuf[0] == 'L' || ThisTokBuf[0] == 'u' || ThisTokBuf[0] == 'U') { in init()
1414 ++ThisTokBuf; in init()
1416 if (ThisTokBuf[0] == '8') in init()
1417 ++ThisTokBuf; in init()
1421 if (ThisTokBuf[0] == 'R') { in init()
1422 ThisTokBuf += 2; // skip R" in init()
1424 const char *Prefix = ThisTokBuf; in init()
1425 while (ThisTokBuf[0] != '(') in init()
1426 ++ThisTokBuf; in init()
1427 ++ThisTokBuf; // skip '(' in init()
1430 ThisTokEnd -= ThisTokBuf - Prefix; in init()
1431 assert(ThisTokEnd >= ThisTokBuf && "malformed raw string literal"); in init()
1435 StringRef RemainingTokenSpan(ThisTokBuf, ThisTokEnd - ThisTokBuf); in init()
1451 if (ThisTokBuf[0] != '"') { in init()
1456 ++ThisTokBuf; // skip " in init()
1459 if (Features.PascalStrings && ThisTokBuf + 1 != ThisTokEnd && in init()
1460 ThisTokBuf[0] == '\\' && ThisTokBuf[1] == 'p') { in init()
1465 ++ThisTokBuf; in init()
1468 ThisTokBuf += 2; in init()
1471 while (ThisTokBuf != ThisTokEnd) { in init()
1473 if (ThisTokBuf[0] != '\\') { in init()
1474 const char *InStart = ThisTokBuf; in init()
1476 ++ThisTokBuf; in init()
1477 } while (ThisTokBuf != ThisTokEnd && ThisTokBuf[0] != '\\'); in init()
1481 StringRef(InStart, ThisTokBuf - InStart))) in init()
1486 if (ThisTokBuf[1] == 'u' || ThisTokBuf[1] == 'U') { in init()
1487 EncodeUCNEscape(ThisTokBegin, ThisTokBuf, ThisTokEnd, in init()
1495 ProcessCharEscape(ThisTokBegin, ThisTokBuf, ThisTokEnd, hadError, in init()