Home | History | Annotate | Download | only in Lex

Lines Matching defs:End

62          "We assume that the input buffer has a null character at the end"
175 // Now that the lexer is created, change the start/end locations so that we
190 // Ensure that the lexer thinks it is inside a directive, so that end \n will
254 // Search backwards from the end of the token to find the matching closing
305 file.begin(), tokenBegin, file.end());
443 Buffer.begin(), StrData, Buffer.end());
484 Lexer TheLexer(LexerStartLoc, LangOpts, BufStart, LexStart, Buffer.end());
546 Buffer.end());
562 while (CurPtr != Buffer.end()) {
570 if (CurPtr != Buffer.end())
578 // If we've hit the end of the file, we're done.
583 // If we haven't hit the end of the preprocessor directive, skip this
588 // We've passed the end of the preprocessor directive, and will look
671 // We only end up here if we didn't recognize the preprocessor
684 SourceLocation End;
686 End = IfStartTok.getLocation();
688 End = ActiveCommentLoc; // don't truncate a decl comment.
690 End = TheTok.getLocation();
692 return std::make_pair(End.getRawEncoding() - StartLoc.getRawEncoding(),
734 // Final detail: if we end up on an escaped newline, we want to return the
744 /// \brief Computes the source location just past the end of the
748 /// points just past the end of the token referenced by \p Loc, and
755 /// \param Offset an offset from the end of the token, where the source
757 /// location pointing just past the end of the token; an offset of 1 produces
833 SourceLocation End = Range.getEnd();
834 assert(Begin.isFileID() && End.isFileID());
836 End = Lexer::getLocForEndOfToken(End, 0, SM,LangOpts);
837 if (End.isInvalid())
849 if (!SM.isInFileID(End, FID, &EndOffs) ||
853 return CharSourceRange::getCharRange(Begin, End);
860 SourceLocation End = Range.getEnd();
861 if (Begin.isInvalid() || End.isInvalid())
864 if (Begin.isFileID() && End.isFileID())
867 if (Begin.isMacroID() && End.isFileID()) {
874 if (Begin.isFileID() && End.isMacroID()) {
875 if ((Range.isTokenRange() && !isAtEndOfMacroExpansion(End, SM, LangOpts,
876 &End)) ||
877 (Range.isCharRange() && !isAtStartOfMacroExpansion(End, SM, LangOpts,
878 &End)))
880 Range.setEnd(End);
884 assert(Begin.isMacroID() && End.isMacroID());
887 ((Range.isTokenRange() && isAtEndOfMacroExpansion(End, SM, LangOpts,
889 (Range.isCharRange() && isAtStartOfMacroExpansion(End, SM, LangOpts,
903 const SrcMgr::SLocEntry &EndEntry = SM.getSLocEntry(SM.getFileID(End),
912 Range.setEnd(SM.getImmediateSpellingLoc(End));
1180 TokenBegin, File.end());
1388 const char *End) {
1390 L.getSourceLocation(End));
1557 /// constant. From[-1] is the first character lexed. Return the end of the
1670 // End of suffix. Check whether this is on the whitelist.
1733 (C == 0 && CurPtr-1 == BufferEnd)) { // End of file.
1828 } else if (C == 0 && CurPtr-1 == BufferEnd) { // End of file.
1861 (C == 0 && (CurPtr-1 == BufferEnd || // End of file.
1915 (C == 0 && CurPtr-1 == BufferEnd)) { // End of file.
1973 // End of preprocessor directive line, let LexTokenInternal handle this.
2125 // If we are inside a preprocessor directive and we see the end of line,
2246 /// comments, because they cannot cause the comment to end. The only thing
2247 /// that can happen is the comment could end with an escaped newline between
2282 // then this slash does not end the block comment, it is part of it.
2287 // Skip over all non-interesting characters until we find end of buffer or a
2306 // not necessary to set C here, it will be overwritten at the end of
2354 // if this is a /*/, which will end the comment. This misses cases with
2435 // Found end of file?
2451 // Okay, we found the end of the line. First, back up past the \0, \r, \n.
2470 /// LexEndOfFile - CurPtr points to the end of this file. Handle this
2475 // If we hit the end of the file while parsing a preprocessor directive,
2476 // end the preprocessor directive first. The next token returned will
2477 // then be the end of file.
2509 // C99 5.1.1.2p2: If the file is non-empty and didn't end in a newline, issue
2576 /// \brief Find the end of a version control conflict marker.
2622 // Diagnose this, and ignore to the end of line.
2626 // Skip ahead to the end of line. We know this exists because the
2627 // end-of-conflict marker starts with \r or \n.
2629 assert(CurPtr != BufferEnd && "Didn't find end of line");
2636 // No end of conflict marker found.
2643 /// is the end of a conflict marker. Handle it by ignoring up until the end of
2661 // If we do have it, search for the end of the conflict marker. This could
2663 // be the end of conflict marker.
2664 if (const char *End = FindConflictEnd(CurPtr, BufferEnd,
2666 CurPtr = End;
2668 // Skip ahead to the end of line.
2896 /// has a null character at the end of the file. This returns a preprocessing
2935 // Found end of file?
2958 // If we're in Microsoft extensions mode, treat this as end of file.
2968 // If we are inside a preprocessor directive and we see the end of line,