Lines Matching refs:CurPtr
527 const char *CurPtr = Buffer->getBufferStart(); in ComputePreamble() local
529 while (CurPtr != Buffer->getBufferEnd()) { in ComputePreamble()
530 char ch = *CurPtr++; in ComputePreamble()
537 if (CurPtr != Buffer->getBufferEnd()) in ComputePreamble()
538 MaxLineOffset = CurPtr - Buffer->getBufferStart(); in ComputePreamble()
1466 void Lexer::LexIdentifier(Token &Result, const char *CurPtr) { in LexIdentifier() argument
1469 unsigned char C = *CurPtr++; in LexIdentifier()
1471 C = *CurPtr++; in LexIdentifier()
1473 --CurPtr; // Back up over the skipped character. in LexIdentifier()
1484 FormTokenWithChars(Result, CurPtr, tok::raw_identifier); in LexIdentifier()
1506 C = getCharAndSize(CurPtr, Size); in LexIdentifier()
1514 Diag(CurPtr, diag::ext_dollar_in_identifier); in LexIdentifier()
1515 CurPtr = ConsumeChar(CurPtr, Size, Result); in LexIdentifier()
1516 C = getCharAndSize(CurPtr, Size); in LexIdentifier()
1524 CurPtr = ConsumeChar(CurPtr, Size, Result); in LexIdentifier()
1526 C = getCharAndSize(CurPtr, Size); in LexIdentifier()
1528 CurPtr = ConsumeChar(CurPtr, Size, Result); in LexIdentifier()
1529 C = getCharAndSize(CurPtr, Size); in LexIdentifier()
1548 void Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { in LexNumericConstant() argument
1550 char C = getCharAndSize(CurPtr, Size); in LexNumericConstant()
1553 CurPtr = ConsumeChar(CurPtr, Size, Result); in LexNumericConstant()
1555 C = getCharAndSize(CurPtr, Size); in LexNumericConstant()
1563 return LexNumericConstant(Result, ConsumeChar(CurPtr, Size, Result)); in LexNumericConstant()
1568 return LexNumericConstant(Result, ConsumeChar(CurPtr, Size, Result)); in LexNumericConstant()
1572 FormTokenWithChars(Result, CurPtr, tok::numeric_constant); in LexNumericConstant()
1578 const char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr) { in LexUDSuffix() argument
1583 char C = getCharAndSize(CurPtr, Size); in LexUDSuffix()
1587 Diag(CurPtr, in LexUDSuffix()
1590 << FixItHint::CreateInsertion(getSourceLocation(CurPtr), " "); in LexUDSuffix()
1591 return CurPtr; in LexUDSuffix()
1600 Diag(CurPtr, getLangOpts().MicrosoftMode ? in LexUDSuffix()
1603 << FixItHint::CreateInsertion(getSourceLocation(CurPtr), " "); in LexUDSuffix()
1604 return CurPtr; in LexUDSuffix()
1609 CurPtr = ConsumeChar(CurPtr, Size, Result); in LexUDSuffix()
1610 C = getCharAndSize(CurPtr, Size); in LexUDSuffix()
1613 return CurPtr; in LexUDSuffix()
1618 void Lexer::LexStringLiteral(Token &Result, const char *CurPtr, in LexStringLiteral() argument
1628 char C = getAndAdvanceChar(CurPtr, Result); in LexStringLiteral()
1633 C = getAndAdvanceChar(CurPtr, Result); in LexStringLiteral()
1636 (C == 0 && CurPtr-1 == BufferEnd)) { // End of file. in LexStringLiteral()
1639 FormTokenWithChars(Result, CurPtr-1, tok::unknown); in LexStringLiteral()
1644 if (isCodeCompletionPoint(CurPtr-1)) { in LexStringLiteral()
1646 FormTokenWithChars(Result, CurPtr-1, tok::unknown); in LexStringLiteral()
1650 NulCharacter = CurPtr-1; in LexStringLiteral()
1652 C = getAndAdvanceChar(CurPtr, Result); in LexStringLiteral()
1657 CurPtr = LexUDSuffix(Result, CurPtr); in LexStringLiteral()
1665 FormTokenWithChars(Result, CurPtr, Kind); in LexStringLiteral()
1671 void Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, in LexRawStringLiteral() argument
1683 while (PrefixLen != 16 && isRawStringDelimBody(CurPtr[PrefixLen])) in LexRawStringLiteral()
1687 if (CurPtr[PrefixLen] != '(') { in LexRawStringLiteral()
1689 const char *PrefixEnd = &CurPtr[PrefixLen]; in LexRawStringLiteral()
1702 char C = *CurPtr++; in LexRawStringLiteral()
1706 if (C == 0 && CurPtr-1 == BufferEnd) { in LexRawStringLiteral()
1707 --CurPtr; in LexRawStringLiteral()
1712 FormTokenWithChars(Result, CurPtr, tok::unknown); in LexRawStringLiteral()
1717 const char *Prefix = CurPtr; in LexRawStringLiteral()
1718 CurPtr += PrefixLen + 1; // skip over prefix and '(' in LexRawStringLiteral()
1721 char C = *CurPtr++; in LexRawStringLiteral()
1725 if (strncmp(CurPtr, Prefix, PrefixLen) == 0 && CurPtr[PrefixLen] == '"') { in LexRawStringLiteral()
1726 CurPtr += PrefixLen + 1; // skip over prefix and '"' in LexRawStringLiteral()
1729 } else if (C == 0 && CurPtr-1 == BufferEnd) { // End of file. in LexRawStringLiteral()
1733 FormTokenWithChars(Result, CurPtr-1, tok::unknown); in LexRawStringLiteral()
1740 CurPtr = LexUDSuffix(Result, CurPtr); in LexRawStringLiteral()
1744 FormTokenWithChars(Result, CurPtr, Kind); in LexRawStringLiteral()
1750 void Lexer::LexAngledStringLiteral(Token &Result, const char *CurPtr) { in LexAngledStringLiteral() argument
1752 const char *AfterLessPos = CurPtr; in LexAngledStringLiteral()
1753 char C = getAndAdvanceChar(CurPtr, Result); in LexAngledStringLiteral()
1758 C = getAndAdvanceChar(CurPtr, Result); in LexAngledStringLiteral()
1760 (C == 0 && (CurPtr-1 == BufferEnd || // End of file. in LexAngledStringLiteral()
1761 isCodeCompletionPoint(CurPtr-1)))) { in LexAngledStringLiteral()
1767 NulCharacter = CurPtr-1; in LexAngledStringLiteral()
1769 C = getAndAdvanceChar(CurPtr, Result); in LexAngledStringLiteral()
1778 FormTokenWithChars(Result, CurPtr, tok::angle_string_literal); in LexAngledStringLiteral()
1785 void Lexer::LexCharConstant(Token &Result, const char *CurPtr, in LexCharConstant() argument
1793 char C = getAndAdvanceChar(CurPtr, Result); in LexCharConstant()
1797 FormTokenWithChars(Result, CurPtr, tok::unknown); in LexCharConstant()
1806 C = getAndAdvanceChar(CurPtr, Result); in LexCharConstant()
1808 (C == 0 && CurPtr-1 == BufferEnd)) { // End of file. in LexCharConstant()
1811 FormTokenWithChars(Result, CurPtr-1, tok::unknown); in LexCharConstant()
1814 if (isCodeCompletionPoint(CurPtr-1)) { in LexCharConstant()
1816 FormTokenWithChars(Result, CurPtr-1, tok::unknown); in LexCharConstant()
1820 NulCharacter = CurPtr-1; in LexCharConstant()
1822 C = getAndAdvanceChar(CurPtr, Result); in LexCharConstant()
1827 CurPtr = LexUDSuffix(Result, CurPtr); in LexCharConstant()
1835 FormTokenWithChars(Result, CurPtr, Kind); in LexCharConstant()
1844 bool Lexer::SkipWhitespace(Token &Result, const char *CurPtr) { in SkipWhitespace() argument
1846 unsigned char Char = *CurPtr; // Skip consequtive spaces efficiently. in SkipWhitespace()
1850 Char = *++CurPtr; in SkipWhitespace()
1858 BufferPtr = CurPtr; in SkipWhitespace()
1867 Char = *++CurPtr; in SkipWhitespace()
1871 char PrevChar = CurPtr[-1]; in SkipWhitespace()
1877 FormTokenWithChars(Result, CurPtr, tok::unknown); in SkipWhitespace()
1881 BufferPtr = CurPtr; in SkipWhitespace()
1891 bool Lexer::SkipBCPLComment(Token &Result, const char *CurPtr) { in SkipBCPLComment() argument
1907 C = *CurPtr; in SkipBCPLComment()
1911 C = *++CurPtr; in SkipBCPLComment()
1913 const char *NextLine = CurPtr; in SkipBCPLComment()
1916 const char *EscapePtr = CurPtr-1; in SkipBCPLComment()
1921 CurPtr = EscapePtr; in SkipBCPLComment()
1924 CurPtr = EscapePtr-2; in SkipBCPLComment()
1928 C = *CurPtr; in SkipBCPLComment()
1935 const char *OldPtr = CurPtr; in SkipBCPLComment()
1938 C = getAndAdvanceChar(CurPtr, Result); in SkipBCPLComment()
1943 if (C != 0 && CurPtr == OldPtr+1) { in SkipBCPLComment()
1944 CurPtr = NextLine; in SkipBCPLComment()
1951 if (CurPtr != OldPtr+1 && C != '/' && CurPtr[0] != '/') { in SkipBCPLComment()
1952 for (; OldPtr != CurPtr; ++OldPtr) in SkipBCPLComment()
1957 const char *ForwardPtr = CurPtr; in SkipBCPLComment()
1970 if (CurPtr == BufferEnd+1) { in SkipBCPLComment()
1971 --CurPtr; in SkipBCPLComment()
1975 if (C == '\0' && isCodeCompletionPoint(CurPtr-1)) { in SkipBCPLComment()
1987 getSourceLocation(CurPtr)))) { in SkipBCPLComment()
1988 BufferPtr = CurPtr; in SkipBCPLComment()
1994 return SaveBCPLComment(Result, CurPtr); in SkipBCPLComment()
1998 if (ParsingPreprocessorDirective || CurPtr == BufferEnd) { in SkipBCPLComment()
1999 BufferPtr = CurPtr; in SkipBCPLComment()
2008 ++CurPtr; in SkipBCPLComment()
2014 BufferPtr = CurPtr; in SkipBCPLComment()
2020 bool Lexer::SaveBCPLComment(Token &Result, const char *CurPtr) { in SaveBCPLComment() argument
2023 FormTokenWithChars(Result, CurPtr, tok::comment); in SaveBCPLComment()
2048 static bool isEndOfBlockCommentWithEscapedNewLine(const char *CurPtr, in isEndOfBlockCommentWithEscapedNewLine() argument
2050 assert(CurPtr[0] == '\n' || CurPtr[0] == '\r'); in isEndOfBlockCommentWithEscapedNewLine()
2053 --CurPtr; in isEndOfBlockCommentWithEscapedNewLine()
2056 if (CurPtr[0] == '\n' || CurPtr[0] == '\r') { in isEndOfBlockCommentWithEscapedNewLine()
2058 if (CurPtr[0] == CurPtr[1]) in isEndOfBlockCommentWithEscapedNewLine()
2061 --CurPtr; in isEndOfBlockCommentWithEscapedNewLine()
2067 while (isHorizontalWhitespace(*CurPtr) || *CurPtr == 0) { in isEndOfBlockCommentWithEscapedNewLine()
2068 --CurPtr; in isEndOfBlockCommentWithEscapedNewLine()
2073 if (*CurPtr == '\\') { in isEndOfBlockCommentWithEscapedNewLine()
2074 if (CurPtr[-1] != '*') return false; in isEndOfBlockCommentWithEscapedNewLine()
2077 if (CurPtr[0] != '/' || CurPtr[-1] != '?' || CurPtr[-2] != '?' || in isEndOfBlockCommentWithEscapedNewLine()
2078 CurPtr[-3] != '*') in isEndOfBlockCommentWithEscapedNewLine()
2082 CurPtr -= 2; in isEndOfBlockCommentWithEscapedNewLine()
2088 L->Diag(CurPtr, diag::trigraph_ignored_block_comment); in isEndOfBlockCommentWithEscapedNewLine()
2092 L->Diag(CurPtr, diag::trigraph_ends_block_comment); in isEndOfBlockCommentWithEscapedNewLine()
2097 L->Diag(CurPtr, diag::escaped_newline_block_comment_end); in isEndOfBlockCommentWithEscapedNewLine()
2101 L->Diag(CurPtr, diag::backslash_newline_space); in isEndOfBlockCommentWithEscapedNewLine()
2122 bool Lexer::SkipBlockComment(Token &Result, const char *CurPtr) { in SkipBlockComment() argument
2132 unsigned char C = getCharAndSize(CurPtr, CharSize); in SkipBlockComment()
2133 CurPtr += CharSize; in SkipBlockComment()
2134 if (C == 0 && CurPtr == BufferEnd+1) { in SkipBlockComment()
2137 --CurPtr; in SkipBlockComment()
2142 FormTokenWithChars(Result, CurPtr, tok::unknown); in SkipBlockComment()
2146 BufferPtr = CurPtr; in SkipBlockComment()
2153 C = *CurPtr++; in SkipBlockComment()
2158 if (CurPtr + 24 < BufferEnd && in SkipBlockComment()
2163 while (C != '/' && ((intptr_t)CurPtr & 0x0F) != 0) in SkipBlockComment()
2164 C = *CurPtr++; in SkipBlockComment()
2170 while (CurPtr+16 <= BufferEnd) { in SkipBlockComment()
2171 int cmp = _mm_movemask_epi8(_mm_cmpeq_epi8(*(__m128i*)CurPtr, Slashes)); in SkipBlockComment()
2176 CurPtr += llvm::CountTrailingZeros_32(cmp) + 1; in SkipBlockComment()
2179 CurPtr += 16; in SkipBlockComment()
2186 while (CurPtr+16 <= BufferEnd && in SkipBlockComment()
2187 !vec_any_eq(*(vector unsigned char*)CurPtr, Slashes)) in SkipBlockComment()
2188 CurPtr += 16; in SkipBlockComment()
2191 while (CurPtr[0] != '/' && in SkipBlockComment()
2192 CurPtr[1] != '/' && in SkipBlockComment()
2193 CurPtr[2] != '/' && in SkipBlockComment()
2194 CurPtr[3] != '/' && in SkipBlockComment()
2195 CurPtr+4 < BufferEnd) { in SkipBlockComment()
2196 CurPtr += 4; in SkipBlockComment()
2201 C = *CurPtr++; in SkipBlockComment()
2206 C = *CurPtr++; in SkipBlockComment()
2210 if (CurPtr[-2] == '*') // We found the final */. We're done! in SkipBlockComment()
2213 if ((CurPtr[-2] == '\n' || CurPtr[-2] == '\r')) { in SkipBlockComment()
2214 if (isEndOfBlockCommentWithEscapedNewLine(CurPtr-2, this)) { in SkipBlockComment()
2220 if (CurPtr[0] == '*' && CurPtr[1] != '/') { in SkipBlockComment()
2225 Diag(CurPtr-1, diag::warn_nested_block_comment); in SkipBlockComment()
2227 } else if (C == 0 && CurPtr == BufferEnd+1) { in SkipBlockComment()
2233 --CurPtr; in SkipBlockComment()
2238 FormTokenWithChars(Result, CurPtr, tok::unknown); in SkipBlockComment()
2242 BufferPtr = CurPtr; in SkipBlockComment()
2244 } else if (C == '\0' && isCodeCompletionPoint(CurPtr-1)) { in SkipBlockComment()
2250 C = *CurPtr++; in SkipBlockComment()
2256 getSourceLocation(CurPtr)))) { in SkipBlockComment()
2257 BufferPtr = CurPtr; in SkipBlockComment()
2263 FormTokenWithChars(Result, CurPtr, tok::comment); in SkipBlockComment()
2271 if (isHorizontalWhitespace(*CurPtr)) { in SkipBlockComment()
2273 SkipWhitespace(Result, CurPtr+1); in SkipBlockComment()
2278 BufferPtr = CurPtr; in SkipBlockComment()
2296 const char *CurPtr = BufferPtr; in ReadToEndOfLine() local
2298 char Char = getAndAdvanceChar(CurPtr, Tmp); in ReadToEndOfLine()
2305 if (CurPtr-1 != BufferEnd) { in ReadToEndOfLine()
2306 if (isCodeCompletionPoint(CurPtr-1)) { in ReadToEndOfLine()
2320 assert(CurPtr[-1] == Char && "Trigraphs for newline?"); in ReadToEndOfLine()
2321 BufferPtr = CurPtr-1; in ReadToEndOfLine()
2342 bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { in LexEndOfFile() argument
2350 FormTokenWithChars(Result, CurPtr, tok::eod); in LexEndOfFile()
2378 if (CurPtr != BufferStart && (CurPtr[-1] != '\n' && CurPtr[-1] != '\r')) in LexEndOfFile()
2383 BufferPtr = CurPtr; in LexEndOfFile()
2422 static const char *FindConflictEnd(const char *CurPtr, const char *BufferEnd, in FindConflictEnd() argument
2426 StringRef RestOfBuffer(CurPtr+TermLen, BufferEnd-CurPtr-TermLen); in FindConflictEnd()
2445 bool Lexer::IsStartOfConflictMarker(const char *CurPtr) { in IsStartOfConflictMarker() argument
2447 if (CurPtr != BufferStart && in IsStartOfConflictMarker()
2448 CurPtr[-1] != '\n' && CurPtr[-1] != '\r') in IsStartOfConflictMarker()
2452 if ((BufferEnd-CurPtr < 8 || StringRef(CurPtr, 7) != "<<<<<<<") && in IsStartOfConflictMarker()
2453 (BufferEnd-CurPtr < 6 || StringRef(CurPtr, 5) != ">>>> ")) in IsStartOfConflictMarker()
2461 ConflictMarkerKind Kind = *CurPtr == '<' ? CMK_Normal : CMK_Perforce; in IsStartOfConflictMarker()
2465 if (FindConflictEnd(CurPtr, BufferEnd, Kind)) { in IsStartOfConflictMarker()
2468 Diag(CurPtr, diag::err_conflict_marker); in IsStartOfConflictMarker()
2473 while (*CurPtr != '\r' && *CurPtr != '\n') { in IsStartOfConflictMarker()
2474 assert(CurPtr != BufferEnd && "Didn't find end of line"); in IsStartOfConflictMarker()
2475 ++CurPtr; in IsStartOfConflictMarker()
2477 BufferPtr = CurPtr; in IsStartOfConflictMarker()
2490 bool Lexer::HandleEndOfConflictMarker(const char *CurPtr) { in HandleEndOfConflictMarker() argument
2492 if (CurPtr != BufferStart && in HandleEndOfConflictMarker()
2493 CurPtr[-1] != '\n' && CurPtr[-1] != '\r') in HandleEndOfConflictMarker()
2503 if (CurPtr[i] != CurPtr[0]) in HandleEndOfConflictMarker()
2509 if (const char *End = FindConflictEnd(CurPtr, BufferEnd, in HandleEndOfConflictMarker()
2511 CurPtr = End; in HandleEndOfConflictMarker()
2514 while (CurPtr != BufferEnd && *CurPtr != '\r' && *CurPtr != '\n') in HandleEndOfConflictMarker()
2515 ++CurPtr; in HandleEndOfConflictMarker()
2517 BufferPtr = CurPtr; in HandleEndOfConflictMarker()
2527 bool Lexer::isCodeCompletionPoint(const char *CurPtr) const { in isCodeCompletionPoint()
2529 SourceLocation Loc = FileLoc.getLocWithOffset(CurPtr-BufferStart); in isCodeCompletionPoint()
2549 const char *CurPtr = BufferPtr; in LexTokenInternal() local
2552 if ((*CurPtr == ' ') || (*CurPtr == '\t')) { in LexTokenInternal()
2553 ++CurPtr; in LexTokenInternal()
2554 while ((*CurPtr == ' ') || (*CurPtr == '\t')) in LexTokenInternal()
2555 ++CurPtr; in LexTokenInternal()
2561 FormTokenWithChars(Result, CurPtr, tok::unknown); in LexTokenInternal()
2565 BufferPtr = CurPtr; in LexTokenInternal()
2572 char Char = getAndAdvanceChar(CurPtr, Result); in LexTokenInternal()
2578 if (CurPtr-1 == BufferEnd) { in LexTokenInternal()
2582 if (LexEndOfFile(Result, CurPtr-1)) // Retreat back into the file. in LexTokenInternal()
2589 if (isCodeCompletionPoint(CurPtr-1)) { in LexTokenInternal()
2592 FormTokenWithChars(Result, CurPtr, tok::code_completion); in LexTokenInternal()
2597 Diag(CurPtr-1, diag::null_in_file); in LexTokenInternal()
2599 if (SkipWhitespace(Result, CurPtr)) in LexTokenInternal()
2610 if (LexEndOfFile(Result, CurPtr-1)) // Retreat back into the file. in LexTokenInternal()
2641 if (SkipWhitespace(Result, CurPtr)) in LexTokenInternal()
2650 if (SkipWhitespace(Result, CurPtr)) in LexTokenInternal()
2654 CurPtr = BufferPtr; in LexTokenInternal()
2658 if (CurPtr[0] == '/' && CurPtr[1] == '/' && !inKeepCommentMode() && in LexTokenInternal()
2660 if (SkipBCPLComment(Result, CurPtr+2)) in LexTokenInternal()
2663 } else if (CurPtr[0] == '/' && CurPtr[1] == '*' && !inKeepCommentMode()) { in LexTokenInternal()
2664 if (SkipBlockComment(Result, CurPtr+2)) in LexTokenInternal()
2667 } else if (isHorizontalWhitespace(*CurPtr)) { in LexTokenInternal()
2678 return LexNumericConstant(Result, CurPtr); in LexTokenInternal()
2685 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2689 return LexStringLiteral(Result, ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2694 return LexCharConstant(Result, ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2698 if (Char == 'R' && getCharAndSize(CurPtr + SizeTmp, SizeTmp2) == '"') in LexTokenInternal()
2700 ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2705 char Char2 = getCharAndSize(CurPtr + SizeTmp, SizeTmp2); in LexTokenInternal()
2710 ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2716 char Char3 = getCharAndSize(CurPtr + SizeTmp + SizeTmp2, SizeTmp3); in LexTokenInternal()
2720 ConsumeChar(ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2730 return LexIdentifier(Result, CurPtr); in LexTokenInternal()
2737 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2741 return LexStringLiteral(Result, ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2746 return LexCharConstant(Result, ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2750 if (Char == 'R' && getCharAndSize(CurPtr + SizeTmp, SizeTmp2) == '"') in LexTokenInternal()
2752 ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2758 return LexIdentifier(Result, CurPtr); in LexTokenInternal()
2765 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2769 ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2774 return LexIdentifier(Result, CurPtr); in LexTokenInternal()
2779 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2783 return LexStringLiteral(Result, ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2788 getCharAndSize(CurPtr + SizeTmp, SizeTmp2) == '"') in LexTokenInternal()
2790 ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2796 return LexCharConstant(Result, ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2812 return LexIdentifier(Result, CurPtr); in LexTokenInternal()
2817 Diag(CurPtr-1, diag::ext_dollar_in_identifier); in LexTokenInternal()
2820 return LexIdentifier(Result, CurPtr); in LexTokenInternal()
2830 return LexCharConstant(Result, CurPtr, tok::char_constant); in LexTokenInternal()
2836 return LexStringLiteral(Result, CurPtr, tok::string_literal); in LexTokenInternal()
2861 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2866 return LexNumericConstant(Result, ConsumeChar(CurPtr, SizeTmp, Result)); in LexTokenInternal()
2869 CurPtr += SizeTmp; in LexTokenInternal()
2871 getCharAndSize(CurPtr+SizeTmp, SizeTmp2) == '.') { in LexTokenInternal()
2873 CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2880 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2883 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2886 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2892 if (getCharAndSize(CurPtr, SizeTmp) == '=') { in LexTokenInternal()
2894 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2900 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2902 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2905 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2912 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2914 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2917 getCharAndSize(CurPtr+SizeTmp, SizeTmp2) == '*') { // C++ ->* in LexTokenInternal()
2918 CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2922 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2925 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2935 if (getCharAndSize(CurPtr, SizeTmp) == '=') { in LexTokenInternal()
2937 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2944 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2955 getCharAndSize(CurPtr+SizeTmp, SizeTmp2) != '*') && in LexTokenInternal()
2957 if (SkipBCPLComment(Result, ConsumeChar(CurPtr, SizeTmp, Result))) in LexTokenInternal()
2968 if (SkipBlockComment(Result, ConsumeChar(CurPtr, SizeTmp, Result))) in LexTokenInternal()
2974 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2981 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2984 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2987 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2989 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
2990 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
2991 if (Char == '%' && getCharAndSize(CurPtr+SizeTmp, SizeTmp2) == ':') { in LexTokenInternal()
2993 CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
2996 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3006 FormTokenWithChars(Result, CurPtr, tok::hash); in LexTokenInternal()
3033 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
3035 return LexAngledStringLiteral(Result, CurPtr); in LexTokenInternal()
3037 char After = getCharAndSize(CurPtr+SizeTmp, SizeTmp2); in LexTokenInternal()
3040 CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
3042 } else if (After == '<' && IsStartOfConflictMarker(CurPtr-1)) { in LexTokenInternal()
3046 } else if (After == '<' && HandleEndOfConflictMarker(CurPtr-1)) { in LexTokenInternal()
3052 CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
3055 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3059 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3063 getCharAndSize(CurPtr + SizeTmp, SizeTmp2) == ':') { in LexTokenInternal()
3070 char After = getCharAndSize(CurPtr + SizeTmp + SizeTmp2, SizeTmp3); in LexTokenInternal()
3079 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3082 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3089 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
3091 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3094 char After = getCharAndSize(CurPtr+SizeTmp, SizeTmp2); in LexTokenInternal()
3096 CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
3099 } else if (After == '>' && IsStartOfConflictMarker(CurPtr-1)) { in LexTokenInternal()
3103 } else if (After == '>' && HandleEndOfConflictMarker(CurPtr-1)) { in LexTokenInternal()
3108 CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), in LexTokenInternal()
3111 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3120 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
3122 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3129 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
3132 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3135 if (CurPtr[1] == '|' && HandleEndOfConflictMarker(CurPtr-1)) in LexTokenInternal()
3138 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3144 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
3147 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3150 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3159 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
3162 if (CurPtr[1] == '=' && HandleEndOfConflictMarker(CurPtr-1)) in LexTokenInternal()
3166 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3175 Char = getCharAndSize(CurPtr, SizeTmp); in LexTokenInternal()
3178 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3183 CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); in LexTokenInternal()
3190 FormTokenWithChars(Result, CurPtr, tok::hash); in LexTokenInternal()
3215 if (CurPtr[-1] == '@' && LangOpts.ObjC1) in LexTokenInternal()
3233 FormTokenWithChars(Result, CurPtr, Kind); in LexTokenInternal()