Lines Matching refs:tok

53   case tok::kw_asm:
55 case tok::kw_namespace:
58 case tok::kw_using:
60 case tok::kw_static_assert:
61 case tok::kw__Static_assert:
149 case tok::kw__Atomic:
150 if (NextToken().isNot(tok::l_paren)) {
155 case tok::kw_typeof:
156 case tok::kw___attribute:
157 case tok::kw___underlying_type: {
159 if (Tok.isNot(tok::l_paren))
162 if (!SkipUntil(tok::r_paren))
167 case tok::kw_class:
168 case tok::kw_struct:
169 case tok::kw_union:
170 case tok::kw___interface:
171 case tok::kw_enum:
182 while (Tok.is(tok::l_square) || Tok.is(tok::kw___attribute) ||
183 Tok.is(tok::kw___declspec) || Tok.is(tok::kw_alignas)) {
184 if (Tok.is(tok::l_square)) {
186 if (!SkipUntil(tok::r_square))
190 if (Tok.isNot(tok::l_paren))
193 if (!SkipUntil(tok::r_paren))
200 if (Tok.is(tok::annot_cxxscope))
202 if (Tok.isNot(tok::identifier) && Tok.isNot(tok::annot_template_id))
207 case tok::annot_cxxscope:
213 if (getLangOpts().ObjC1 && Tok.is(tok::less))
236 if (Tok.isNot(tok::l_paren)) {
249 if (Tok.isNot(tok::semi) && (!AllowForRangeDecl || Tok.isNot(tok::colon)))
290 if (Tok.is(tok::kw_asm) || Tok.is(tok::kw___attribute))
294 if (Tok.is(tok::l_paren)) {
297 if (!SkipUntil(tok::r_paren, StopAtSemi))
299 } else if (Tok.is(tok::l_brace)) {
303 } else if (Tok.is(tok::equal) || isTokIdentifier_in()) {
323 if (Tok.isNot(tok::comma))
360 assert(Tok.is(tok::l_paren) && "Expected '('");
372 if (Tok.is(tok::equal) ||
373 Tok.is(tok::kw_asm) || Tok.is(tok::kw___attribute))
375 else if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace))
430 assert(Tok.is(tok::l_paren) && "Expected '('");
442 if (Context == TypeIdInParens && Tok.is(tok::r_paren)) {
450 (Tok.is(tok::greater) || Tok.is(tok::comma) ||
451 (getLangOpts().CPlusPlus11 && Tok.is(tok::greatergreater)))) {
501 if (Tok.is(tok::kw_alignas))
504 if (Tok.isNot(tok::l_square) || NextToken().isNot(tok::l_square))
520 bool IsAttribute = SkipUntil(tok::r_square);
521 IsAttribute &= Tok.is(tok::r_square);
543 bool IsAttribute = Tok.is(tok::r_square);
564 while (Tok.isNot(tok::r_square)) {
565 if (Tok.is(tok::comma)) {
581 if (Tok.is(tok::coloncolon)) {
590 if (Tok.is(tok::l_paren)) {
592 if (!SkipUntil(tok::r_paren)) {
598 if (Tok.is(tok::ellipsis))
601 if (Tok.isNot(tok::comma))
609 if (Tok.is(tok::r_square)) {
611 IsAttribute = Tok.is(tok::r_square);
629 if (Tok.is(tok::coloncolon) || Tok.is(tok::identifier))
633 if (Tok.is(tok::star) || Tok.is(tok::amp) || Tok.is(tok::caret) ||
634 Tok.is(tok::ampamp) ||
635 (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::star))) {
638 while (Tok.is(tok::kw_const) ||
639 Tok.is(tok::kw_volatile) ||
640 Tok.is(tok::kw_restrict))
667 assert(Tok.is(tok::kw_operator));
672 case tok::kw_new: case tok::kw_delete:
674 if (Tok.is(tok::l_square) && NextToken().is(tok::r_square)) {
681 case tok::Token:
687 case tok::l_square:
688 if (NextToken().is(tok::r_square)) {
695 case tok::l_paren:
696 if (NextToken().is(tok::r_paren)) {
716 if (Tok.is(tok::identifier))
805 if (Tok.is(tok::ellipsis))
808 if ((Tok.is(tok::identifier) || Tok.is(tok::kw_operator) ||
809 (Tok.is(tok::annot_cxxscope) && (NextToken().is(tok::identifier) ||
810 NextToken().is(tok::kw_operator)))) &&
813 if (Tok.is(tok::annot_cxxscope))
815 else if (Tok.is(tok::identifier))
817 if (Tok.is(tok::kw_operator)) {
822 } else if (Tok.is(tok::l_paren)) {
825 (Tok.is(tok::r_paren) || // 'int()' is a function.
827 (Tok.is(tok::ellipsis) && NextToken().is(tok::r_paren)) ||
838 if (Tok.is(tok::kw___attribute) ||
839 Tok.is(tok::kw___declspec) ||
840 Tok.is(tok::kw___cdecl) ||
841 Tok.is(tok::kw___stdcall) ||
842 Tok.is(tok::kw___fastcall) ||
843 Tok.is(tok::kw___thiscall) ||
844 Tok.is(tok::kw___unaligned))
849 if (Tok.isNot(tok::r_paren))
861 if (Tok.is(tok::ellipsis))
864 if (Tok.is(tok::l_paren)) {
876 } else if (Tok.is(tok::l_square)) {
892 Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) {
895 case tok::numeric_constant:
896 case tok::char_constant:
897 case tok::wide_char_constant:
898 case tok::utf16_char_constant:
899 case tok::utf32_char_constant:
900 case tok::string_literal:
901 case tok::wide_string_literal:
902 case tok::utf8_string_literal:
903 case tok::utf16_string_literal:
904 case tok::utf32_string_literal:
905 case tok::l_square:
906 case tok::l_paren:
907 case tok::amp:
908 case tok::ampamp:
909 case tok::star:
910 case tok::plus:
911 case tok::plusplus:
912 case tok::minus:
913 case tok::minusminus:
914 case tok::tilde:
915 case tok::exclaim:
916 case tok::kw_sizeof:
917 case tok::kw___func__:
918 case tok::kw_const_cast:
919 case tok::kw_delete:
920 case tok::kw_dynamic_cast:
921 case tok::kw_false:
922 case tok::kw_new:
923 case tok::kw_operator:
924 case tok::kw_reinterpret_cast:
925 case tok::kw_static_cast:
926 case tok::kw_this:
927 case tok::kw_throw:
928 case tok::kw_true:
929 case tok::kw_typeid:
930 case tok::kw_alignof:
931 case tok::kw_noexcept:
932 case tok::kw_nullptr:
933 case tok::kw__Alignof:
934 case tok::kw___null:
935 case tok::kw___alignof:
936 case tok::kw___builtin_choose_expr:
937 case tok::kw___builtin_offsetof:
938 case tok::kw___builtin_types_compatible_p:
939 case tok::kw___builtin_va_arg:
940 case tok::kw___imag:
941 case tok::kw___real:
942 case tok::kw___FUNCTION__:
943 case tok::kw___FUNCDNAME__:
944 case tok::kw_L__FUNCTION__:
945 case tok::kw___PRETTY_FUNCTION__:
946 case tok::kw___has_nothrow_assign:
947 case tok::kw___has_nothrow_copy:
948 case tok::kw___has_nothrow_constructor:
949 case tok::kw___has_trivial_assign:
950 case tok::kw___has_trivial_copy:
951 case tok::kw___has_trivial_constructor:
952 case tok::kw___has_trivial_destructor:
953 case tok::kw___has_virtual_destructor:
954 case tok::kw___is_abstract:
955 case tok::kw___is_base_of:
956 case tok::kw___is_class:
957 case tok::kw___is_convertible_to:
958 case tok::kw___is_empty:
959 case tok::kw___is_enum:
960 case tok::kw___is_interface_class:
961 case tok::kw___is_final:
962 case tok::kw___is_literal:
963 case tok::kw___is_literal_type:
964 case tok::kw___is_pod:
965 case tok::kw___is_polymorphic:
966 case tok::kw___is_sealed:
967 case tok::kw___is_trivial:
968 case tok::kw___is_trivially_assignable:
969 case tok::kw___is_trivially_constructible:
970 case tok::kw___is_trivially_copyable:
971 case tok::kw___is_union:
972 case tok::kw___uuidof:
976 case tok::kw_char:
977 case tok::kw_const:
978 case tok::kw_double:
979 case tok::kw_enum:
980 case tok::kw_half:
981 case tok::kw_float:
982 case tok::kw_int:
983 case tok::kw_long:
984 case tok::kw___int64:
985 case tok::kw___int128:
986 case tok::kw_restrict:
987 case tok::kw_short:
988 case tok::kw_signed:
989 case tok::kw_struct:
990 case tok::kw_union:
991 case tok::kw_unsigned:
992 case tok::kw_void:
993 case tok::kw_volatile:
994 case tok::kw__Bool:
995 case tok::kw__Complex:
996 case tok::kw_class:
997 case tok::kw_typename:
998 case tok::kw_wchar_t:
999 case tok::kw_char16_t:
1000 case tok::kw_char32_t:
1001 case tok::kw__Decimal32:
1002 case tok::kw__Decimal64:
1003 case tok::kw__Decimal128:
1004 case tok::kw___interface:
1005 case tok::kw___thread:
1006 case tok::kw_thread_local:
1007 case tok::kw__Thread_local:
1008 case tok::kw_typeof:
1009 case tok::kw___underlying_type:
1010 case tok::kw___cdecl:
1011 case tok::kw___stdcall:
1012 case tok::kw___fastcall:
1013 case tok::kw___thiscall:
1014 case tok::kw___unaligned:
1015 case tok::kw___vector:
1016 case tok::kw___pixel:
1017 case tok::kw__Atomic:
1018 case tok::kw_image1d_t:
1019 case tok::kw_image1d_array_t:
1020 case tok::kw_image1d_buffer_t:
1021 case tok::kw_image2d_t:
1022 case tok::kw_image2d_array_t:
1023 case tok::kw_image3d_t:
1024 case tok::kw_sampler_t:
1025 case tok::kw_event_t:
1026 case tok::kw___unknown_anytype:
1151 case tok::identifier: {
1159 if (!getLangOpts().ObjC1 && Next.is(tok::identifier))
1162 if (Next.isNot(tok::coloncolon) && Next.isNot(tok::less)) {
1169 TypoCorrection.WantTypeSpecifiers = Next.isNot(tok::arrow);
1185 assert(Tok.isNot(tok::identifier) &&
1197 if (Tok.is(tok::identifier))
1205 case tok::kw_typename: // typename T::type
1212 case tok::coloncolon: { // ::foo::bar
1214 if (Next.is(tok::kw_new) || // ::new
1215 Next.is(tok::kw_delete)) // ::delete
1219 case tok::kw_decltype:
1233 case tok::kw_friend:
1234 case tok::kw_typedef:
1235 case tok::kw_constexpr:
1237 case tok::kw_register:
1238 case tok::kw_static:
1239 case tok::kw_extern:
1240 case tok::kw_mutable:
1241 case tok::kw_auto:
1242 case tok::kw___thread:
1243 case tok::kw_thread_local:
1244 case tok::kw__Thread_local:
1246 case tok::kw_inline:
1247 case tok::kw_virtual:
1248 case tok::kw_explicit:
1251 case tok::kw___module_private__:
1254 case tok::kw___unknown_anytype:
1266 case tok::kw_class:
1267 case tok::kw_struct:
1268 case tok::kw_union:
1269 case tok::kw___interface:
1271 case tok::kw_enum:
1273 case tok::kw_const:
1274 case tok::kw_volatile:
1277 case tok::kw_restrict:
1278 case tok::kw__Complex:
1279 case tok::kw___attribute:
1283 case tok::kw___declspec:
1284 case tok::kw___cdecl:
1285 case tok::kw___stdcall:
1286 case tok::kw___fastcall:
1287 case tok::kw___thiscall:
1288 case tok::kw___w64:
1289 case tok::kw___sptr:
1290 case tok::kw___uptr:
1291 case tok::kw___ptr64:
1292 case tok::kw___ptr32:
1293 case tok::kw___forceinline:
1294 case tok::kw___unaligned:
1298 case tok::kw___pascal:
1302 case tok::kw___vector:
1305 case tok::annot_template_id: {
1311 assert(Tok.is(tok::annot_typename));
1315 case tok::annot_cxxscope: // foo::bar or ::foo::bar, but already parsed
1319 if (!Tok.is(tok::annot_typename)) {
1322 if (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::identifier)) {
1331 bool isIdentifier = Tok.is(tok::identifier);
1365 assert(Tok.isNot(tok::annot_cxxscope) ||
1366 NextToken().isNot(tok::identifier));
1394 case tok::annot_typename:
1397 if (getLangOpts().ObjC1 && NextToken().is(tok::less)) {
1403 bool isFollowedByParen = Tok.is(tok::l_paren);
1404 bool isFollowedByBrace = Tok.is(tok::l_brace);
1420 case tok::kw_char:
1421 case tok::kw_wchar_t:
1422 case tok::kw_char16_t:
1423 case tok::kw_char32_t:
1424 case tok::kw_bool:
1425 case tok::kw_short:
1426 case tok::kw_int:
1427 case tok::kw_long:
1428 case tok::kw___int64:
1429 case tok::kw___int128:
1430 case tok::kw_signed:
1431 case tok::kw_unsigned:
1432 case tok::kw_half:
1433 case tok::kw_float:
1434 case tok::kw_double:
1435 case tok::kw_void:
1436 case tok::annot_decltype:
1437 if (NextToken().is(tok::l_paren))
1446 if (getLangOpts().CPlusPlus11 && NextToken().is(tok::l_brace))
1455 case tok::kw_typeof: {
1456 if (NextToken().isNot(tok::l_paren))
1462 bool isFollowedByParen = Tok.is(tok::l_paren);
1463 bool isFollowedByBrace = Tok.is(tok::l_brace);
1480 case tok::kw___underlying_type:
1484 case tok::kw__Atomic:
1495 case tok::annot_decltype:
1496 case tok::annot_template_id:
1497 case tok::annot_typename:
1498 case tok::kw_typeof:
1499 case tok::kw___underlying_type:
1503 case tok::kw_class:
1504 case tok::kw_struct:
1505 case tok::kw_union:
1506 case tok::kw___interface:
1507 case tok::kw_enum:
1511 case tok::kw_char:
1512 case tok::kw_wchar_t:
1513 case tok::kw_char16_t:
1514 case tok::kw_char32_t:
1515 case tok::kw_bool:
1516 case tok::kw_short:
1517 case tok::kw_int:
1518 case tok::kw_long:
1519 case tok::kw___int64:
1520 case tok::kw___int128:
1521 case tok::kw_signed:
1522 case tok::kw_unsigned:
1523 case tok::kw_half:
1524 case tok::kw_float:
1525 case tok::kw_double:
1526 case tok::kw_void:
1527 case tok::kw___unknown_anytype:
1530 case tok::kw_auto:
1533 case tok::kw__Atomic:
1535 return NextToken().is(tok::l_paren);
1547 assert(Tok.is(tok::kw_typeof) && "Expected 'typeof'!");
1550 assert(Tok.is(tok::l_paren) && "Expected '('");
1553 if (!SkipUntil(tok::r_paren, StopAtSemi))
1562 assert(Tok.is(tok::less) && "Expected '<' for qualifier list");
1565 if (Tok.isNot(tok::identifier))
1569 if (Tok.is(tok::comma)) {
1574 if (Tok.is(tok::greater)) {
1610 if (Tok.isNot(tok::r_paren))
1614 if (Next.is(tok::amp) || Next.is(tok::ampamp) ||
1615 Next.is(tok::kw_const) || Next.is(tok::kw_volatile) ||
1616 Next.is(tok::kw_throw) || Next.is(tok::kw_noexcept) ||
1617 Next.is(tok::l_square) || isCXX11VirtSpecifier(Next) ||
1618 Next.is(tok::l_brace) || Next.is(tok::kw_try) ||
1619 Next.is(tok::equal) || Next.is(tok::arrow))
1660 if (Tok.is(tok::r_paren))
1672 if (Tok.is(tok::ellipsis)) {
1674 if (Tok.is(tok::r_paren))
1704 if (SeenType && Tok.is(tok::identifier))
1726 if (Tok.is(tok::kw___attribute))
1740 return (Tok.is(tok::equal) || Tok.is(tok::r_paren)) ? TPResult::True()
1743 if (Tok.is(tok::equal)) {
1747 if (!SkipUntil(tok::comma, tok::r_paren, StopAtSemi | StopBeforeMatch))
1751 if (Tok.is(tok::ellipsis)) {
1753 if (Tok.is(tok::r_paren))
1759 if (Tok.isNot(tok::comma))
1784 if (TPR == TPResult::Ambiguous() && Tok.isNot(tok::r_paren))
1791 if (!SkipUntil(tok::r_paren, StopAtSemi))
1795 while (Tok.is(tok::kw_const) ||
1796 Tok.is(tok::kw_volatile) ||
1797 Tok.is(tok::kw_restrict) )
1801 if (Tok.is(tok::amp) || Tok.is(tok::ampamp))
1805 if (Tok.is(tok::kw_throw)) {
1807 if (Tok.isNot(tok::l_paren))
1812 if (!SkipUntil(tok::r_paren, StopAtSemi))
1815 if (Tok.is(tok::kw_noexcept)) {
1818 if (Tok.is(tok::l_paren)) {
1821 if (!SkipUntil(tok::r_paren, StopAtSemi))
1833 if (!SkipUntil(tok::r_square, StopAtSemi))