Lines Matching refs:Tok
158 if (Tok.is(tok::code_completion)) {
164 if (Tok.is(tok::kw_throw))
209 tok::TokenKind K = Tok.getKind();
223 prec::Level NextTokPrec = getBinOpPrecedence(Tok.getKind(),
236 Token OpToken = Tok;
245 PP.EnterToken(Tok);
246 Tok = OpToken;
253 if (Tok.isNot(tok::colon)) {
270 Diag(Tok, diag::ext_gnu_conditional_expr);
278 SourceLocation FILoc = Tok.getLocation();
296 Diag(Tok, diag::err_expected)
299 ColonLoc = Tok.getLocation();
305 if (Tok.is(tok::code_completion) && NextTokPrec == prec::Assignment) {
323 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {
337 NextTokPrec = getBinOpPrecedence(Tok.getKind(), GreaterThanIsOperator,
349 Diag(Tok, diag::err_init_list_bin_op)
350 << /*LHS*/0 << PP.getSpelling(Tok) << Actions.getExprRange(RHS.get());
365 NextTokPrec = getBinOpPrecedence(Tok.getKind(), GreaterThanIsOperator,
419 Diag(Tok, diag::err_expected_expression);
622 tok::TokenKind SavedKind = Tok.getKind();
669 Res = Actions.ActOnNumericConstant(Tok, /*UDLScope*/getCurScope());
682 Diag(Tok, diag::warn_cxx98_compat_nullptr);
687 Res = getExprAnnotation(Tok);
695 assert(Tok.isNot(tok::kw_decltype));
711 if (Next.is(tok::l_paren) && Tok.is(tok::identifier) &&
712 Tok.getIdentifierInfo()->hasRevertedTokenIDToIdentifier() &&
725 if (!Tok.is(tok::identifier))
732 IdentifierInfo &II = *Tok.getIdentifierInfo();
736 if (getLangOpts().ObjC1 && Tok.is(tok::period) &&
743 if (Tok.isNot(tok::identifier) &&
744 !(getLangOpts().CPlusPlus && Tok.is(tok::kw_class))) {
745 Diag(Tok, diag::err_expected_property_name);
748 IdentifierInfo &PropertyName = *Tok.getIdentifierInfo();
762 ((Tok.is(tok::identifier) &&
764 Tok.is(tok::code_completion))) {
776 ((Tok.is(tok::identifier) && !InMessageExpression) ||
777 Tok.is(tok::code_completion))) {
779 if (Tok.is(tok::code_completion) ||
820 Name, Tok.is(tok::l_paren),
828 Res = Actions.ActOnCharacterConstant(Tok, /*UDLScope*/getCurScope());
837 Res = Actions.ActOnPredefinedExpr(Tok.getLocation(), SavedKind);
905 Diag(Tok, diag::ext_c11_alignment) << Tok.getName();
916 if (Tok.isNot(tok::identifier))
917 return ExprError(Diag(Tok, diag::err_expected) << tok::identifier);
920 return ExprError(Diag(Tok, diag::err_address_of_label_outside_fn));
923 LabelDecl *LD = Actions.LookupOrCreateLabel(Tok.getIdentifierInfo(),
924 Tok.getLocation());
925 Res = Actions.ActOnAddrLabel(AmpAmpLoc, Tok.getLocation(), LD);
947 ParsedType Type = getTypeAnnotation(Tok);
951 DS.SetRangeStart(Tok.getLocation());
952 DS.SetRangeEnd(Tok.getLastLoc());
956 DS.SetTypeSpecType(TST_typename, Tok.getAnnotationEndLoc(),
993 Diag(Tok, diag::err_expected_expression);
1003 if (!Actions.isSimpleTypeSpecifier(Tok.getKind()))
1015 if (Tok.isNot(tok::l_paren) &&
1016 (!getLangOpts().CPlusPlus11 || Tok.isNot(tok::l_brace)))
1017 return ExprError(Diag(Tok, diag::err_expected_lparen_after_type)
1020 if (Tok.is(tok::l_brace))
1021 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists);
1032 if (!Tok.is(tok::annot_cxxscope))
1058 TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok);
1080 if (!Tok.is(tok::coloncolon))
1086 if (Tok.is(tok::kw_new))
1088 if (Tok.is(tok::kw_delete))
1097 return ParseCXXNewExpression(false, Tok.getLocation());
1100 return ParseCXXDeleteExpression(false, Tok.getLocation());
1103 Diag(Tok, diag::warn_cxx98_compat_noexcept_expr);
1204 switch (Tok.getKind()) {
1235 if (getLangOpts().ObjC1 && Tok.isAtStartOfLine() &&
1248 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {
1249 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists);
1254 SourceLocation RLoc = Tok.getLocation();
1256 if (!LHS.isInvalid() && !Idx.isInvalid() && Tok.is(tok::r_square)) {
1270 tok::TokenKind OpKind = Tok.getKind();
1292 Diag(Tok, diag::err_expected) << tok::greatergreatergreater;
1323 if (Tok.is(tok::code_completion)) {
1330 if (Tok.isNot(tok::r_paren)) {
1341 } else if (Tok.isNot(tok::r_paren)) {
1349 ArgExprs, Tok.getLocation(),
1360 tok::TokenKind OpKind = Tok.getKind();
1369 if (BaseType && Tok.is(tok::l_paren) &&
1391 if (Tok.is(tok::code_completion)) {
1415 if (getLangOpts().ObjC2 && OpKind == tok::period && Tok.is(tok::kw_class)) {
1423 IdentifierInfo *Id = Tok.getIdentifierInfo();
1439 Tok.is(tok::l_paren));
1445 LHS = Actions.ActOnPostfixUnaryOp(getCurScope(), Tok.getLocation(),
1446 Tok.getKind(), LHS.get());
1491 if (Tok.isNot(tok::l_paren)) {
1515 Diag(Tok, diag::err_expected_after) << OpTok.getIdentifierInfo()
1527 SourceLocation LParenLoc = Tok.getLocation(), RParenLoc;
1569 assert((Tok.is(tok::kw_sizeof) || Tok.is(tok::kw___alignof) ||
1570 Tok.is(tok::kw_alignof) || Tok.is(tok::kw__Alignof) ||
1571 Tok.is(tok::kw_vec_step)) &&
1573 Token OpTok = Tok;
1577 if (Tok.is(tok::ellipsis) && OpTok.is(tok::kw_sizeof)) {
1582 if (Tok.is(tok::l_paren)) {
1586 if (Tok.is(tok::identifier)) {
1587 Name = Tok.getIdentifierInfo();
1594 Diag(Tok, diag::err_expected_parameter_pack);
1597 } else if (Tok.is(tok::identifier)) {
1598 Name = Tok.getIdentifierInfo();
1607 Diag(Tok, diag::err_sizeof_parameter_pack);
1681 const IdentifierInfo *BuiltinII = Tok.getIdentifierInfo();
1683 tok::TokenKind T = Tok.getKind();
1687 if (Tok.isNot(tok::l_paren))
1688 return ExprError(Diag(Tok, diag::err_expected_after) << BuiltinII
1708 if (Tok.isNot(tok::r_paren)) {
1709 Diag(Tok, diag::err_expected) << tok::r_paren;
1720 SourceLocation TypeLoc = Tok.getLocation();
1733 if (Tok.isNot(tok::identifier)) {
1734 Diag(Tok, diag::err_expected) << tok::identifier;
1744 Comps.back().U.IdentInfo = Tok.getIdentifierInfo();
1749 if (Tok.is(tok::period)) {
1755 if (Tok.isNot(tok::identifier)) {
1756 Diag(Tok, diag::err_expected) << tok::identifier;
1760 Comps.back().U.IdentInfo = Tok.getIdentifierInfo();
1763 } else if (Tok.is(tok::l_square)) {
1783 if (Tok.isNot(tok::r_paren)) {
1825 if (Tok.isNot(tok::r_paren)) {
1826 Diag(Tok, diag::err_expected) << tok::r_paren;
1852 if (Tok.isNot(tok::r_paren)) {
1853 Diag(Tok, diag::err_expected) << tok::r_paren;
1881 if (Tok.isNot(tok::r_paren)) {
1882 Diag(Tok, diag::err_expected) << tok::r_paren;
1926 assert(Tok.is(tok::l_paren) && "Not a paren expr!");
1937 if (Tok.is(tok::code_completion)) {
1947 (Tok.is(tok::kw___bridge) ||
1948 Tok.is(tok::kw___bridge_transfer) ||
1949 Tok.is(tok::kw___bridge_retained) ||
1950 Tok.is(tok::kw___bridge_retain)));
1953 StringRef BridgeCastName = Tok.getName();
1965 if (ExprType >= CompoundStmt && Tok.is(tok::l_brace)) {
1966 Diag(Tok, diag::ext_gnu_statement_expr);
1974 Result = Actions.ActOnStmtExpr(OpenLoc, Stmt.get(), Tok.getLocation());
1979 tok::TokenKind tokenKind = Tok.getKind();
2039 if (!DeclaratorInfo.isInvalidType() && Tok.is(tok::identifier) &&
2055 if (Tok.is(tok::l_brace)) {
2084 if (Tok.is(tok::identifier) && getLangOpts().ObjC1 &&
2085 Tok.getIdentifierInfo() == Ident_super &&
2088 Diag(Tok.getLocation(), diag::err_illegal_super_cast)
2106 Diag(Tok, diag::err_expected_lbrace_in_compound_literal);
2118 Result = Actions.ActOnParenListExpr(OpenLoc, Tok.getLocation(),
2128 if (!Result.isInvalid() && Tok.is(tok::r_paren))
2130 Actions.ActOnParenExpr(OpenLoc, Tok.getLocation(), Result.get());
2156 assert(Tok.is(tok::l_brace) && "Not a compound literal!");
2181 StringToks.push_back(Tok);
2205 assert(Tok.is(tok::kw__Generic) && "_Generic keyword expected");
2237 if (Tok.is(tok::kw_default)) {
2241 Diag(Tok, diag::err_duplicate_default_assoc);
2313 if (Tok.is(tok::code_completion)) {
2323 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {
2324 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists);
2329 if (Tok.is(tok::ellipsis))
2336 if (Tok.isNot(tok::comma))
2361 if (Tok.isNot(tok::comma))
2376 if (Tok.is(tok::code_completion)) {
2409 assert(Tok.is(tok::caret) && "block literal starts with ^");
2430 ParamInfo.SetSourceRange(SourceRange(Tok.getLocation(), Tok.getLocation()));
2434 if (Tok.is(tok::l_paren)) {
2454 } else if (!Tok.is(tok::l_brace)) {
2491 if (!Tok.is(tok::l_brace)) {
2493 Diag(Tok, diag::err_expected_expression);
2512 tok::TokenKind Kind = Tok.getKind();