Lines Matching defs:Tok
148 bool HandleFirstTokOnLine(Token &Tok);
162 const Token &Tok) {
163 return ConcatInfo.AvoidConcat(PrevPrevTok, PrevTok, Tok);
505 bool PrintPPOutputPPCallbacks::HandleFirstTokOnLine(Token &Tok) {
508 if (!MoveToLine(Tok.getLocation()))
513 unsigned ColNo = SM.getExpansionColumnNumber(Tok.getLocation());
519 if (ColNo == 1 && Tok.hasLeadingSpace())
528 if (ColNo <= 1 && Tok.is(tok::hash))
576 while (PragmaTok.isNot(tok::eod)) {
595 static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok,
608 Callbacks->MoveToLine(Tok.getLocation());
612 if (Tok.isAtStartOfLine() && Callbacks->HandleFirstTokOnLine(Tok)) {
614 } else if (Tok.hasLeadingSpace() ||
619 Callbacks->AvoidConcat(PrevPrevTok, PrevTok, Tok))) {
623 if (DropComments && Tok.is(tok::comment)) {
625 // tok::comment nodes at all when not keeping comments, but under
627 SourceLocation StartLoc = Tok.getLocation();
628 Callbacks->MoveToLine(StartLoc.getLocWithOffset(Tok.getLength()));
629 } else if (Tok.is(tok::annot_module_include) ||
630 Tok.is(tok::annot_module_begin) ||
631 Tok.is(tok::annot_module_end)) {
634 PP.Lex(Tok);
636 } else if (IdentifierInfo *II = Tok.getIdentifierInfo()) {
638 } else if (Tok.isLiteral() && !Tok.needsCleaning() &&
639 Tok.getLiteralData()) {
640 OS.write(Tok.getLiteralData(), Tok.getLength());
641 } else if (Tok.getLength() < 256) {
643 unsigned Len = PP.getSpelling(Tok, TokPtr);
648 if (Tok.getKind() == tok::comment || Tok.getKind() == tok::unknown)
651 std::string S = PP.getSpelling(Tok);
656 if (Tok.getKind() == tok::comment || Tok.getKind() == tok::unknown)
661 if (Tok.is(tok::eof)) break;
664 PrevTok = Tok;
665 PP.Lex(Tok);
682 Token Tok;
683 do PP.Lex(Tok);
684 while (Tok.isNot(tok::eof));
736 Token Tok;
738 PP.Lex(Tok);
739 if (Tok.is(tok::eof) || !Tok.getLocation().isFileID())
742 PresumedLoc PLoc = SourceMgr.getPresumedLoc(Tok.getLocation());
751 PrintPreprocessedTokens(PP, Tok, Callbacks, *OS);