Lines Matching refs:Tok
92 if (PeekTok.is(tok::l_paren)) {
98 if (PeekTok.is(tok::code_completion)) {
128 if (PeekTok.isNot(tok::r_paren)) {
130 << "'defined'" << tok::r_paren;
131 PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;
167 if (PeekTok.is(tok::code_completion)) {
187 II->getTokenID() != tok::kw_true &&
188 II->getTokenID() != tok::kw_false)
190 Result.Val = II->getTokenID() == tok::kw_true;
201 case tok::eod:
202 case tok::r_paren:
206 case tok::numeric_constant: {
268 case tok::char_constant: // 'x'
269 case tok::wide_char_constant: // L'x'
270 case tok::utf8_char_constant: // u8'x'
271 case tok::utf16_char_constant: // u'x'
272 case tok::utf32_char_constant: { // U'x'
325 case tok::l_paren: {
334 if (PeekTok.is(tok::r_paren)) {
341 if (PeekTok.isNot(tok::r_paren)) {
344 PP.Diag(Start, diag::note_matching) << tok::l_paren;
353 case tok::plus: {
361 case tok::minus: {
381 case tok::tilde: {
393 case tok::exclaim: {
420 static unsigned getPrecedence(tok::TokenKind Kind) {
423 case tok::percent:
424 case tok::slash:
425 case tok::star: return 14;
426 case tok::plus:
427 case tok::minus: return 13;
428 case tok::lessless:
429 case tok::greatergreater: return 12;
430 case tok::lessequal:
431 case tok::less:
432 case tok::greaterequal:
433 case tok::greater: return 11;
434 case tok::exclaimequal:
435 case tok::equalequal: return 10;
436 case tok::amp: return 9;
437 case tok::caret: return 8;
438 case tok::pipe: return 7;
439 case tok::ampamp: return 6;
440 case tok::pipepipe: return 5;
441 case tok::question: return 4;
442 case tok::comma: return 3;
443 case tok::colon: return 2;
444 case tok::r_paren: return 0;// Lowest priority, end of expr.
445 case tok::eod: return 0;// Lowest priority, end of directive.
473 tok::TokenKind Operator = PeekTok.getKind();
481 if (Operator == tok::ampamp && LHS.Val == 0)
483 else if (Operator == tok::pipepipe && LHS.Val != 0)
485 else if (Operator == tok::question && LHS.Val == 0)
522 if (Operator == tok::question)
524 RHSPrec = getPrecedence(tok::comma);
539 case tok::question: // No UAC for x and y in "x ? y : z".
540 case tok::lessless: // Shift amount doesn't UAC with shift value.
541 case tok::greatergreater: // Shift amount doesn't UAC with shift value.
542 case tok::comma: // Comma operands are not subject to UACs.
543 case tok::pipepipe: // Logical || does not do UACs.
544 case tok::ampamp: // Logical && does not do UACs.
569 case tok::percent:
578 case tok::slash:
591 case tok::star:
597 case tok::lessless: {
605 case tok::greatergreater: {
613 case tok::plus:
619 case tok::minus:
625 case tok::lessequal:
629 case tok::less:
633 case tok::greaterequal:
637 case tok::greater:
641 case tok::exclaimequal:
645 case tok::equalequal:
649 case tok::amp:
652 case tok::caret:
655 case tok::pipe:
658 case tok::ampamp:
662 case tok::pipepipe:
666 case tok::comma:
674 case tok::question: {
676 if (PeekTok.isNot(tok::colon)) {
678 << tok::colon << LHS.getRange() << RHS.getRange();
679 PP.Diag(OpLoc, diag::note_matching) << tok::question;
710 case tok::colon:
743 Token Tok;
744 LexNonComment(Tok);
751 if (EvaluateValue(ResVal, Tok, DT, true, *this)) {
753 if (Tok.isNot(tok::eod))
764 if (Tok.is(tok::eod)) {
777 if (EvaluateDirectiveSubExpr(ResVal, getPrecedence(tok::question),
778 Tok, true, *this)) {
780 if (Tok.isNot(tok::eod))
788 // If we aren't at the tok::eod token, something bad happened, like an extra
790 if (Tok.isNot(tok::eod)) {
791 Diag(Tok, diag::err_pp_expected_eol);