Home | History | Annotate | Download | only in Parse

Lines Matching refs:Tok

150     LHS = Actions.ActOnUnaryOp(getCurScope(), ExtLoc, tok::kw___extension__,
158 if (Tok.is(tok::code_completion)) {
164 if (Tok.is(tok::kw_throw))
166 if (Tok.is(tok::kw_co_yield))
229 tok::TokenKind K = Tok.getKind();
230 if (K == tok::l_brace || K == tok::r_brace ||
231 K == tok::kw_for || K == tok::kw_while ||
232 K == tok::kw_if || K == tok::kw_else ||
233 K == tok::kw_goto || K == tok::kw_try)
242 static bool isFoldOperator(tok::TokenKind Kind) {
250 prec::Level NextTokPrec = getBinOpPrecedence(Tok.getKind(),
263 Token OpToken = Tok;
271 if (OpToken.is(tok::comma) && isNotExpressionStart()) {
272 PP.EnterToken(Tok);
273 Tok = OpToken;
279 if (isFoldOperator(NextTokPrec) && Tok.is(tok::ellipsis)) {
282 PP.EnterToken(Tok);
283 Tok = OpToken;
290 if (Tok.isNot(tok::colon)) {
308 Diag(Tok, diag::ext_gnu_conditional_expr);
311 if (!TryConsumeToken(tok::colon, ColonLoc)) {
316 SourceLocation FILoc = Tok.getLocation();
334 Diag(Tok, diag::err_expected)
335 << tok::colon << FixItHint::CreateInsertion(FILoc, FIText);
336 Diag(OpToken, diag::note_matching) << tok::question;
337 ColonLoc = Tok.getLocation();
343 if (Tok.is(tok::code_completion) && NextTokPrec == prec::Assignment) {
361 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {
381 NextTokPrec = getBinOpPrecedence(Tok.getKind(), GreaterThanIsOperator,
393 Diag(Tok, diag::err_init_list_bin_op)
394 << /*LHS*/0 << PP.getSpelling(Tok) << Actions.getExprRange(RHS.get());
415 NextTokPrec = getBinOpPrecedence(Tok.getKind(), GreaterThanIsOperator,
437 if (!GreaterThanIsOperator && OpToken.is(tok::greatergreater))
470 Diag(Tok, diag::err_expected_expression);
493 if (!NextToken.isOneOf(tok::equal, tok::arrow, tok::period))
686 tok::TokenKind SavedKind = Tok.getKind();
701 case tok::l_paren: {
729 case tok::numeric_constant:
733 Res = Actions.ActOnNumericConstant(Tok, /*UDLScope*/getCurScope());
737 case tok::kw_true:
738 case tok::kw_false:
741 case tok::kw___objc_yes:
742 case tok::kw___objc_no:
745 case tok::kw_nullptr:
746 Diag(Tok, diag::warn_cxx98_compat_nullptr);
749 case tok::annot_primary_expr:
751 Res = getExprAnnotation(Tok);
755 case tok::kw___super:
756 case tok::kw_decltype:
760 assert(Tok.isNot(tok::kw_decltype) && Tok.isNot(tok::kw___super));
763 case tok::identifier: { // primary-expression: identifier
776 if (Next.is(tok::l_paren) &&
777 Tok.is(tok::identifier) &&
778 Tok.getIdentifierInfo()->hasRevertedTokenIDToIdentifier()) {
779 IdentifierInfo *II = Tok.getIdentifierInfo();
785 = RTT_JOIN(tok::kw_,Name)
843 llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind>::iterator Known
846 Tok.setKind(Known->second);
852 if ((!ColonIsSacred && Next.is(tok::colon)) ||
853 Next.isOneOf(tok::coloncolon, tok::less, tok::l_paren,
854 tok::l_brace)) {
858 if (!Tok.is(tok::identifier))
865 IdentifierInfo &II = *Tok.getIdentifierInfo();
869 if (getLangOpts().ObjC1 && Tok.is(tok::period) &&
876 if (Tok.isNot(tok::identifier) &&
877 !(getLangOpts().CPlusPlus && Tok.is(tok::kw_class))) {
878 Diag(Tok, diag::err_expected_property_name);
881 IdentifierInfo &PropertyName = *Tok.getIdentifierInfo();
895 ((Tok.is(tok::identifier) &&
896 (NextToken().is(tok::colon) || NextToken().is(tok::r_square))) ||
897 Tok.is(tok::code_completion))) {
909 ((Tok.is(tok::identifier) && !InMessageExpression) ||
910 Tok.is(tok::code_completion))) {
912 if (Tok.is(tok::code_completion) ||
913 Next.is(tok::colon) || Next.is(tok::r_square))
950 Tok, isTypeCast != NotTypeCast, isTypeCast != IsTypeCast);
952 if (Tok.isOneOf(tok::periodstar, tok::arrowstar)) {
956 Validator->WantRemainingKeywords = Tok.isNot(tok::r_paren);
960 getCurScope(), ScopeSpec, TemplateKWLoc, Name, Tok.is(tok::l_paren),
963 Tok.is(tok::r_paren) ? nullptr : &Replacement);
971 case tok::char_constant: // constant: character-constant
972 case tok::wide_char_constant:
973 case tok::utf8_char_constant:
974 case tok::utf16_char_constant:
975 case tok::utf32_char_constant:
976 Res = Actions.ActOnCharacterConstant(Tok, /*UDLScope*/getCurScope());
979 case tok::kw___func__: // primary-expression: __func__ [C99 6.4.2.2]
980 case tok::kw___FUNCTION__: // primary-expression: __FUNCTION__ [GNU]
981 case tok::kw___FUNCDNAME__: // primary-expression: __FUNCDNAME__ [MS]
982 case tok::kw___FUNCSIG__: // primary-expression: __FUNCSIG__ [MS]
983 case tok::kw_L__FUNCTION__: // primary-expression: L__FUNCTION__ [MS]
984 case tok::kw___PRETTY_FUNCTION__: // primary-expression: __P..Y_F..N__ [GNU]
985 Res = Actions.ActOnPredefinedExpr(Tok.getLocation(), SavedKind);
988 case tok::string_literal: // primary-expression: string-literal
989 case tok::wide_string_literal:
990 case tok::utf8_string_literal:
991 case tok::utf16_string_literal:
992 case tok::utf32_string_literal:
995 case tok::kw__Generic: // primary-expression: generic-selection [C11 6.5.1]
998 case tok::kw___builtin_va_arg:
999 case tok::kw___builtin_offsetof:
1000 case tok::kw___builtin_choose_expr:
1001 case tok::kw___builtin_astype: // primary-expression: [OCL] as_type()
1002 case tok::kw___builtin_convertvector:
1004 case tok::kw___null:
1007 case tok::plusplus: // unary-expression: '++' unary-expression [C99]
1008 case tok::minusminus: { // unary-expression: '--' unary-expression [C99]
1024 case tok::amp: { // unary-expression: '&' cast-expression
1033 case tok::star: // unary-expression: '*' cast-expression
1034 case tok::plus: // unary-expression: '+' cast-expression
1035 case tok::minus: // unary-expression: '-' cast-expression
1036 case tok::tilde: // unary-expression: '~' cast-expression
1037 case tok::exclaim: // unary-expression: '!' cast-expression
1038 case tok::kw___real: // unary-expression: '__real' cast-expression [GNU]
1039 case tok::kw___imag: { // unary-expression: '__imag' cast-expression [GNU]
1047 case tok::kw_co_await: { // unary-expression: 'co_await' cast-expression
1055 case tok::kw___extension__:{//unary-expression:'__extension__' cast-expr [GNU]
1064 case tok::kw__Alignof: // unary-expression: '_Alignof' '(' type-name ')'
1066 Diag(Tok, diag::ext_c11_alignment) << Tok.getName();
1068 case tok::kw_alignof: // unary-expression: 'alignof' '(' type-id ')'
1069 case tok::kw___alignof: // unary-expression: '__alignof' unary-expression
1071 case tok::kw_sizeof: // unary-expression: 'sizeof' unary-expression
1073 case tok::kw_vec_step: // unary-expression: OpenCL 'vec_step' expression
1075 case tok::kw___builtin_omp_required_simd_align:
1077 case tok::ampamp: { // unary-expression: '&&' identifier
1079 if (Tok.isNot(tok::identifier))
1080 return ExprError(Diag(Tok, diag::err_expected) << tok::identifier);
1083 return ExprError(Diag(Tok, diag::err_address_of_label_outside_fn));
1086 LabelDecl *LD = Actions.LookupOrCreateLabel(Tok.getIdentifierInfo(),
1087 Tok.getLocation());
1088 Res = Actions.ActOnAddrLabel(AmpAmpLoc, Tok.getLocation(), LD);
1092 case tok::kw_const_cast:
1093 case tok::kw_dynamic_cast:
1094 case tok::kw_reinterpret_cast:
1095 case tok::kw_static_cast:
1098 case tok::kw_typeid:
1101 case tok::kw___uuidof:
1104 case tok::kw_this:
1108 case tok::annot_typename:
1110 ParsedType Type = getTypeAnnotation(Tok);
1114 DS.SetRangeStart(Tok.getLocation());
1115 DS.SetRangeEnd(Tok.getLastLoc());
1119 DS.SetTypeSpecType(TST_typename, Tok.getAnnotationEndLoc(),
1135 case tok::annot_decltype:
1136 case tok::kw_char:
1137 case tok::kw_wchar_t:
1138 case tok::kw_char16_t:
1139 case tok::kw_char32_t:
1140 case tok::kw_bool:
1141 case tok::kw_short:
1142 case tok::kw_int:
1143 case tok::kw_long:
1144 case tok::kw___int64:
1145 case tok::kw___int128:
1146 case tok::kw_signed:
1147 case tok::kw_unsigned:
1148 case tok::kw_half:
1149 case tok::kw_float:
1150 case tok::kw_double:
1151 case tok::kw_void:
1152 case tok::kw_typename:
1153 case tok::kw_typeof:
1154 case tok::kw___vector: {
1156 Diag(Tok, diag::err_expected_expression);
1160 if (SavedKind == tok::kw_typename) {
1166 if (!Actions.isSimpleTypeSpecifier(Tok.getKind()))
1178 if (Tok.isNot(tok::l_paren) &&
1179 (!getLangOpts().CPlusPlus11 || Tok.isNot(tok::l_brace)))
1180 return ExprError(Diag(Tok, diag::err_expected_lparen_after_type)
1183 if (Tok.is(tok::l_brace))
1184 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists);
1190 case tok::annot_cxxscope: { // [C++] id-expression: qualified-id
1195 if (!Tok.is(tok::annot_cxxscope))
1200 if (Next.is(tok::annot_template_id)) {
1220 case tok::annot_template_id: { // [C++] template-id
1221 TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok);
1234 case tok::kw_operator: // [C++] id-expression: operator/conversion-function-id
1238 case tok::coloncolon: {
1243 if (!Tok.is(tok::coloncolon))
1249 if (Tok.is(tok::kw_new))
1251 if (Tok.is(tok::kw_delete))
1259 case tok::kw_new: // [C++] new-expression
1260 return ParseCXXNewExpression(false, Tok.getLocation());
1262 case tok::kw_delete: // [C++] delete-expression
1263 return ParseCXXDeleteExpression(false, Tok.getLocation());
1265 case tok::kw_noexcept: { // [C++0x] 'noexcept' '(' expression ')'
1266 Diag(Tok, diag::warn_cxx98_compat_noexcept_expr);
1268 BalancedDelimiterTracker T(*this, tok::l_paren);
1287 case tok::kw_##Spelling:
1291 case tok::kw___array_rank:
1292 case tok::kw___array_extent:
1295 case tok::kw___is_lvalue_expr:
1296 case tok::kw___is_rvalue_expr:
1299 case tok::at: {
1303 case tok::caret:
1306 case tok::code_completion: {
1311 case tok::l_square:
1367 switch (Tok.getKind()) {
1368 case tok::code_completion:
1376 case tok::identifier:
1381 (NextToken().is(tok::colon) || NextToken().is(tok::r_square))) {
1391 case tok::l_square: { // postfix-expression: p-e '[' expression ']'
1398 if (getLangOpts().ObjC1 && Tok.isAtStartOfLine() &&
1407 BalancedDelimiterTracker T(*this, tok::l_square);
1412 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {
1413 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists);
1418 if (!Tok.is(tok::colon)) {
1422 if (Tok.is(tok::colon)) {
1425 if (Tok.isNot(tok::r_square))
1431 SourceLocation RLoc = Tok.getLocation();
1434 Tok.is(tok::r_square)) {
1455 case tok::l_paren: // p-e: p-e '(' argument-expression-list[opt] ')'
1456 case tok::lesslessless: { // p-e: p-e '<<<' argument-expression-list '>>>'
1458 tok::TokenKind OpKind = Tok.getKind();
1463 BalancedDelimiterTracker PT(*this, tok::l_paren);
1465 if (OpKind == tok::lesslessless) {
1476 if (TryConsumeToken(tok::greatergreatergreater, CloseLoc)) {
1478 SkipUntil(tok::greatergreatergreater, StopAtSemi);
1481 Diag(Tok, diag::err_expected) << tok::greatergreatergreater;
1482 Diag(OpenLoc, diag::note_matching) << tok::lesslessless;
1483 SkipUntil(tok::greatergreatergreater, StopAtSemi);
1488 if (ExpectAndConsume(tok::l_paren))
1512 if (Tok.is(tok::code_completion)) {
1518 if (OpKind == tok::l_paren || !LHS.isInvalid()) {
1519 if (Tok.isNot(tok::r_paren)) {
1534 SkipUntil(tok::r_paren, StopAtSemi);
1535 } else if (Tok.isNot(tok::r_paren)) {
1546 SkipUntil(tok::r_paren, StopAtSemi);
1555 ArgExprs, Tok.getLocation(),
1562 case tok::arrow:
1563 case tok::period: {
1566 tok::TokenKind OpKind = Tok.getKind();
1575 if (BaseType && Tok.is(tok::l_paren) &&
1597 if (Tok.is(tok::code_completion)) {
1600 OpLoc, OpKind == tok::arrow);
1621 if (getLangOpts().ObjC2 && OpKind == tok::period &&
1622 Tok.is(tok::kw_class)) {
1630 IdentifierInfo *Id = Tok.getIdentifierInfo();
1650 case tok::plusplus: // postfix-expression: postfix-expression '++'
1651 case tok::minusminus: // postfix-expression: postfix-expression '--'
1653 LHS = Actions.ActOnPostfixUnaryOp(getCurScope(), Tok.getLocation(),
1654 Tok.getKind(), LHS.get());
1691 assert(OpTok.isOneOf(tok::kw_typeof, tok::kw_sizeof, tok::kw___alignof,
1692 tok::kw_alignof, tok::kw__Alignof, tok::kw_vec_step,
1693 tok::kw___builtin_omp_required_simd_align) &&
1699 if (Tok.isNot(tok::l_paren)) {
1702 if (OpTok.isOneOf(tok::kw_sizeof, tok::kw___alignof, tok::kw_alignof,
1703 tok::kw__Alignof)) {
1722 if (OpTok.is(tok::kw_typeof) && !getLangOpts().CPlusPlus) {
1723 Diag(Tok, diag::err_expected_after) << OpTok.getIdentifierInfo()
1724 << tok::l_paren;
1735 SourceLocation LParenLoc = Tok.getLocation(), RParenLoc;
1748 if (getLangOpts().CPlusPlus || OpTok.isNot(tok::kw_typeof)) {
1777 assert(Tok.isOneOf(tok::kw_sizeof, tok::kw___alignof, tok::kw_alignof,
1778 tok::kw__Alignof, tok::kw_vec_step,
1779 tok::kw___builtin_omp_required_simd_align) &&
1781 Token OpTok = Tok;
1785 if (Tok.is(tok::ellipsis) && OpTok.is(tok::kw_sizeof)) {
1790 if (Tok.is(tok::l_paren)) {
1791 BalancedDelimiterTracker T(*this, tok::l_paren);
1794 if (Tok.is(tok::identifier)) {
1795 Name = Tok.getIdentifierInfo();
1802 Diag(Tok, diag::err_expected_parameter_pack);
1803 SkipUntil(tok::r_paren, StopAtSemi);
1805 } else if (Tok.is(tok::identifier)) {
1806 Name = Tok.getIdentifierInfo();
1815 Diag(Tok, diag::err_sizeof_parameter_pack);
1830 if (OpTok.isOneOf(tok::kw_alignof, tok::kw__Alignof))
1845 if (OpTok.isOneOf(tok::kw_alignof, tok::kw___alignof, tok::kw__Alignof))
1847 else if (OpTok.is(tok::kw_vec_step))
1849 else if (OpTok.is(tok::kw___builtin_omp_required_simd_align))
1859 if (OpTok.isOneOf(tok::kw_alignof, tok::kw__Alignof))
1890 const IdentifierInfo *BuiltinII = Tok.getIdentifierInfo();
1892 tok::TokenKind T = Tok.getKind();
1896 if (Tok.isNot(tok::l_paren))
1897 return ExprError(Diag(Tok, diag::err_expected_after) << BuiltinII
1898 << tok::l_paren);
1900 BalancedDelimiterTracker PT(*this, tok::l_paren);
1907 case tok::kw___builtin_va_arg: {
1910 if (ExpectAndConsume(tok::comma)) {
1911 SkipUntil(tok::r_paren, StopAtSemi);
1917 if (Tok.isNot(tok::r_paren)) {
1918 Diag(Tok, diag::err_expected) << tok::r_paren;
1928 case tok::kw___builtin_offsetof: {
1929 SourceLocation TypeLoc = Tok.getLocation();
1932 SkipUntil(tok::r_paren, StopAtSemi);
1936 if (ExpectAndConsume(tok::comma)) {
1937 SkipUntil(tok::r_paren, StopAtSemi);
1942 if (Tok.isNot(tok::identifier)) {
1943 Diag(Tok, diag::err_expected) << tok::identifier;
1944 SkipUntil(tok::r_paren, StopAtSemi);
1953 Comps.back().U.IdentInfo = Tok.getIdentifierInfo();
1958 if (Tok.is(tok::period)) {
1964 if (Tok.isNot(tok::identifier)) {
1965 Diag(Tok, diag::err_expected) << tok::identifier;
1966 SkipUntil(tok::r_paren, StopAtSemi);
1969 Comps.back().U.IdentInfo = Tok.getIdentifierInfo();
1972 } else if (Tok.is(tok::l_square)) {
1979 BalancedDelimiterTracker ST(*this, tok::l_square);
1984 SkipUntil(tok::r_paren, StopAtSemi);
1992 if (Tok.isNot(tok::r_paren)) {
2008 case tok::kw___builtin_choose_expr: {
2011 SkipUntil(tok::r_paren, StopAtSemi);
2014 if (ExpectAndConsume(tok::comma)) {
2015 SkipUntil(tok::r_paren, StopAtSemi);
2021 SkipUntil(tok::r_paren, StopAtSemi);
2024 if (ExpectAndConsume(tok::comma)) {
2025 SkipUntil(tok::r_paren, StopAtSemi);
2031 SkipUntil(tok::r_paren, StopAtSemi);
2034 if (Tok.isNot(tok::r_paren)) {
2035 Diag(Tok, diag::err_expected) << tok::r_paren;
2042 case tok::kw___builtin_astype: {
2046 SkipUntil(tok::r_paren, StopAtSemi);
2050 if (ExpectAndConsume(tok::comma)) {
2051 SkipUntil(tok::r_paren, StopAtSemi);
2061 if (Tok.isNot(tok::r_paren)) {
2062 Diag(Tok, diag::err_expected) << tok::r_paren;
2063 SkipUntil(tok::r_paren, StopAtSemi);
2071 case tok::kw___builtin_convertvector: {
2075 SkipUntil(tok
2079 if (ExpectAndConsume(tok::comma)) {
2080 SkipUntil(tok::r_paren, StopAtSemi);
2090 if (Tok.isNot(tok::r_paren)) {
2091 Diag(Tok, diag::err_expected) << tok::r_paren;
2092 SkipUntil(tok::r_paren, StopAtSemi);
2139 assert(Tok.is(tok::l_paren) && "Not a paren expr!");
2141 BalancedDelimiterTracker T(*this, tok::l_paren);
2150 if (Tok.is(tok::code_completion)) {
2160 Tok.isOneOf(tok::kw___bridge,
2161 tok::kw___bridge_transfer,
2162 tok::kw___bridge_retained,
2163 tok::kw___bridge_retain));
2165 if (!TryConsumeToken(tok::kw___bridge)) {
2166 StringRef BridgeCastName = Tok.getName();
2178 if (ExprType >= CompoundStmt && Tok.is(tok::l_brace)) {
2179 Diag(Tok, diag::ext_gnu_statement_expr);
2202 Result = Actions.ActOnStmtExpr(OpenLoc, Stmt.get(), Tok.getLocation());
2208 tok::TokenKind tokenKind = Tok.getKind();
2213 if (tokenKind == tok::kw___bridge)
2215 else if (tokenKind == tok::kw___bridge_transfer)
2217 else if (tokenKind == tok::kw___bridge_retained)
2222 assert(tokenKind == tok::kw___bridge_retain);
2268 if (!DeclaratorInfo.isInvalidType() && Tok.is(tok::identifier) &&
2270 (NextToken().is(tok::colon) || NextToken().is(tok::r_square))) {
2284 if (Tok.is(tok::l_brace)) {
2313 if (Tok.is(tok::identifier) && getLangOpts().ObjC1 &&
2314 Tok.getIdentifierInfo() == Ident_super &&
2316 GetLookAheadToken(1).isNot(tok::period)) {
2317 Diag(Tok.getLocation(), diag::err_illegal_super_cast)
2335 Diag(Tok, diag::err_expected_lbrace_in_compound_literal);
2338 } else if (Tok.is(tok::ellipsis) &&
2351 if (ArgExprs.size() == 1 && isFoldOperator(Tok.getKind()) &&
2352 NextToken().is(tok::ellipsis))
2356 Result = Actions.ActOnParenListExpr(OpenLoc, Tok.getLocation(),
2370 if (isFoldOperator(Tok.getKind()) && NextToken().is(tok::ellipsis))
2374 if (!Result.isInvalid() && Tok.is(tok::r_paren))
2376 Actions.ActOnParenExpr(OpenLoc, Tok.getLocation(), Result.get());
2381 SkipUntil(tok::r_paren, StopAtSemi);
2402 assert(Tok.is(tok::l_brace) && "Not a compound literal!");
2427 StringToks.push_back(Tok);
2451 assert(Tok.is(tok::kw__Generic) && "_Generic keyword expected");
2457 BalancedDelimiterTracker T(*this, tok::l_paren);
2469 SkipUntil(tok::r_paren, StopAtSemi);
2474 if (ExpectAndConsume(tok::comma)) {
2475 SkipUntil(tok::r_paren, StopAtSemi);
2484 if (Tok.is(tok::kw_default)) {
2488 Diag(Tok, diag::err_duplicate_default_assoc);
2490 SkipUntil(tok::r_paren, StopAtSemi);
2499 SkipUntil(tok::r_paren, StopAtSemi);
2506 if (ExpectAndConsume(tok::colon)) {
2507 SkipUntil(tok::r_paren, StopAtSemi);
2516 SkipUntil(tok::r_paren, StopAtSemi);
2520 } while (TryConsumeToken(tok::comma));
2547 tok::TokenKind Kind = tok::unknown;
2550 Kind = Tok.getKind();
2555 assert(Tok.is(tok::ellipsis) && "not a fold-expression");
2559 if (Tok.isNot(tok::r_paren)) {
2560 if (!isFoldOperator(Tok.getKind()))
2561 return Diag(Tok.getLocation(), diag::err_expected_fold_operator);
2563 if (Kind != tok::unknown && Tok.getKind() != Kind)
2564 Diag(Tok.getLocation(), diag::err_fold_operator_mismatch)
2566 Kind = Tok.getKind();
2612 if (Tok.is(tok::code_completion)) {
2622 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {
2623 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists);
2628 if (Tok.is(tok::ellipsis))
2631 SkipUntil(tok::comma, tok::r_paren, StopBeforeMatch);
2637 if (Tok.isNot(tok::comma))
2671 if (Tok.isNot(tok::comma))
2686 if (Tok.is(tok::code_completion)) {
2716 assert(Tok.is(tok::caret) && "block literal starts with ^");
2737 ParamInfo.SetSourceRange(SourceRange(Tok.getLocation(), Tok.getLocation()));
2741 if (Tok.is(tok::l_paren)) {
2761 } else if (!Tok.is(tok::l_brace)) {
2800 if (!Tok.is(tok::l_brace)) {
2802 Diag(Tok, diag::err_expected_expression);
2821 tok::TokenKind Kind = Tok.getKind();