Lines Matching refs:tok

112   if (PeekTok.is(tok::l_paren)) {
118 if (PeekTok.is(tok::code_completion)) {
149 if (PeekTok.isNot(tok::r_paren)) {
151 << "'defined'" << tok::r_paren;
152 PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;
235 if (PeekTok.is(tok::code_completion)) {
285 case tok::eod:
286 case tok::r_paren:
290 case tok::numeric_constant: {
362 case tok::char_constant: // 'x'
363 case tok::wide_char_constant: // L'x'
364 case tok::utf8_char_constant: // u8'x'
365 case tok::utf16_char_constant: // u'x'
366 case tok::utf32_char_constant: { // U'x'
419 case tok::l_paren: {
428 if (PeekTok.is(tok::r_paren)) {
436 if (PeekTok.isNot(tok::r_paren)) {
439 PP.Diag(Start, diag::note_matching) << tok::l_paren;
449 case tok::plus: {
458 case tok::minus: {
479 case tok::tilde: {
492 case tok::exclaim: {
508 case tok::kw_true:
509 case tok::kw_false:
510 Result.Val = PeekTok.getKind() == tok::kw_true;
526 static unsigned getPrecedence(tok::TokenKind Kind) {
529 case tok::percent:
530 case tok::slash:
531 case tok::star: return 14;
532 case tok::plus:
533 case tok::minus: return 13;
534 case tok::lessless:
535 case tok::greatergreater: return 12;
536 case tok::lessequal:
537 case tok::less:
538 case tok::greaterequal:
539 case tok::greater: return 11;
540 case tok::exclaimequal:
541 case tok::equalequal: return 10;
542 case tok::amp: return 9;
543 case tok::caret: return 8;
544 case tok::pipe: return 7;
545 case tok::ampamp: return 6;
546 case tok::pipepipe: return 5;
547 case tok::question: return 4;
548 case tok::comma: return 3;
549 case tok::colon: return 2;
550 case tok::r_paren: return 0;// Lowest priority, end of expr.
551 case tok::eod: return 0;// Lowest priority, end of directive.
557 if (Tok.is(tok::l_paren) && LHS.getIdentifier())
588 tok::TokenKind Operator = PeekTok.getKind();
596 if (Operator == tok::ampamp && LHS.Val == 0)
598 else if (Operator == tok::pipepipe && LHS.Val != 0)
600 else if (Operator == tok::question && LHS.Val == 0)
637 if (Operator == tok::question)
639 RHSPrec = getPrecedence(tok::comma);
655 case tok::question: // No UAC for x and y in "x ? y : z".
656 case tok::lessless: // Shift amount doesn't UAC with shift value.
657 case tok::greatergreater: // Shift amount doesn't UAC with shift value.
658 case tok::comma: // Comma operands are not subject to UACs.
659 case tok::pipepipe: // Logical || does not do UACs.
660 case tok::ampamp: // Logical && does not do UACs.
685 case tok::percent:
694 case tok::slash:
707 case tok::star:
713 case tok::lessless: {
721 case tok::greatergreater: {
731 case tok::plus:
737 case tok::minus:
743 case tok::lessequal:
747 case tok::less:
751 case tok::greaterequal:
755 case tok::greater:
759 case tok::exclaimequal:
763 case tok::equalequal:
767 case tok::amp:
770 case tok::caret:
773 case tok::pipe:
776 case tok::ampamp:
780 case tok::pipepipe:
784 case tok::comma:
792 case tok::question: {
794 if (PeekTok.isNot(tok::colon)) {
796 << tok::colon << LHS.getRange() << RHS.getRange();
797 PP.Diag(OpLoc, diag::note_matching) << tok::question;
829 case tok::colon:
876 if (Tok.isNot(tok::eod))
893 if (Tok.is(tok::eod)) {
906 if (EvaluateDirectiveSubExpr(ResVal, getPrecedence(tok::question),
909 if (Tok.isNot(tok::eod))
917 // If we aren't at the tok::eod token, something bad happened, like an extra
919 if (Tok.isNot(tok::eod)) {