Home | History | Annotate | Download | only in Parse

Lines Matching refs:Tok

51   switch (Tok.getKind()) {
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:
148 switch (Tok.getKind()) {
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.isOneOf(tok::l_square, tok::kw___attribute, tok::kw___declspec,
183 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))
198 if (Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw_decltype,
199 tok::annot_template_id) &&
202 if (Tok.is(tok::annot_cxxscope))
204 if (Tok.isNot(tok::identifier) && Tok.isNot(tok::annot_template_id))
209 case tok::annot_cxxscope:
215 if (getLangOpts().ObjC1 && Tok.is(tok::less))
238 if (Tok.isNot(tok::l_paren)) {
251 if (Tok.isNot(tok::semi) && (!AllowForRangeDecl || Tok.isNot(tok::colon)))
292 if (Tok.isOneOf(tok::kw_asm, tok::kw___attribute))
296 if (Tok.is(tok::l_paren)) {
299 if (!SkipUntil(tok::r_paren, StopAtSemi))
301 } else if (Tok.is(tok::l_brace)) {
305 } else if (Tok.is(tok::equal) || isTokIdentifier_in()) {
325 if (!TryConsumeToken(tok::comma))
361 assert(Tok.is(tok::l_paren) && "Expected '('");
373 if (Tok.isOneOf(tok::equal, tok::kw_asm, 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.isOneOf(tok::greater, 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 TryConsumeToken(tok::ellipsis);
600 if (!TryConsumeToken(tok::comma))
606 if (Tok.is(tok::r_square)) {
608 IsAttribute = Tok.is(tok::r_square);
626 if (Tok.isOneOf(tok::coloncolon, tok::identifier))
630 if (Tok.isOneOf(tok::star, tok::amp, tok::caret, tok::ampamp) ||
631 (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::star))) {
634 while (Tok.isOneOf(tok::kw_const, tok::kw_volatile, tok::kw_restrict,
635 tok::kw__Nonnull, tok::kw__Nullable,
636 tok::kw__Null_unspecified))
663 assert(Tok.is(tok::kw_operator));
667 switch (Tok.getKind()) {
668 case tok::kw_new: case tok::kw_delete:
670 if (Tok.is(tok::l_square) && NextToken().is(tok::r_square)) {
677 case tok::Token:
683 case tok::l_square:
684 if (NextToken().is(tok::r_square)) {
691 case tok::l_paren:
692 if (NextToken().is(tok::r_paren)) {
707 FoundUDSuffix |= Tok.hasUDSuffix();
712 if (Tok.is(tok::identifier))
801 if (Tok.is(tok::ellipsis))
804 if ((Tok.isOneOf(tok::identifier, tok::kw_operator) ||
805 (Tok.is(tok::annot_cxxscope) && (NextToken().is(tok::identifier) ||
806 NextToken().is(tok::kw_operator)))) &&
809 if (Tok.is(tok::annot_cxxscope))
811 else if (Tok.is(tok::identifier))
812 TentativelyDeclaredIdentifiers.push_back(Tok.getIdentifierInfo());
813 if (Tok.is(tok::kw_operator)) {
818 } else if (Tok.is(tok::l_paren)) {
821 (Tok.is(tok::r_paren) || // 'int()' is a function.
823 (Tok.is(tok::ellipsis) && NextToken().is(tok::r_paren)) ||
834 if (Tok.isOneOf(tok::kw___attribute, tok::kw___declspec, tok::kw___cdecl,
835 tok::kw___stdcall, tok::kw___fastcall, tok::kw___thiscall,
836 tok::kw___vectorcall, tok::kw___unaligned))
841 if (Tok.isNot(tok::r_paren))
853 if (Tok.is(tok::ellipsis))
856 if (Tok.is(tok::l_paren)) {
868 } else if (Tok.is(tok::l_square)) {
884 Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) {
887 case tok::numeric_constant:
888 case tok::char_constant:
889 case tok::wide_char_constant:
890 case tok::utf8_char_constant:
891 case tok::utf16_char_constant:
892 case tok::utf32_char_constant:
893 case tok::string_literal:
894 case tok::wide_string_literal:
895 case tok::utf8_string_literal:
896 case tok::utf16_string_literal:
897 case tok::utf32_string_literal:
898 case tok::l_square:
899 case tok::l_paren:
900 case tok::amp:
901 case tok::ampamp:
902 case tok::star:
903 case tok::plus:
904 case tok::plusplus:
905 case tok::minus:
906 case tok::minusminus:
907 case tok::tilde:
908 case tok::exclaim:
909 case tok::kw_sizeof:
910 case tok::kw___func__:
911 case tok::kw_const_cast:
912 case tok::kw_delete:
913 case tok::kw_dynamic_cast:
914 case tok::kw_false:
915 case tok::kw_new:
916 case tok::kw_operator:
917 case tok::kw_reinterpret_cast:
918 case tok::kw_static_cast:
919 case tok::kw_this:
920 case tok::kw_throw:
921 case tok::kw_true:
922 case tok::kw_typeid:
923 case tok::kw_alignof:
924 case tok::kw_noexcept:
925 case tok::kw_nullptr:
926 case tok::kw__Alignof:
927 case tok::kw___null:
928 case tok::kw___alignof:
929 case tok::kw___builtin_choose_expr:
930 case tok::kw___builtin_offsetof:
931 case tok::kw___builtin_va_arg:
932 case tok::kw___imag:
933 case tok::kw___real:
934 case tok::kw___FUNCTION__:
935 case tok::kw___FUNCDNAME__:
936 case tok::kw___FUNCSIG__:
937 case tok::kw_L__FUNCTION__:
938 case tok::kw___PRETTY_FUNCTION__:
939 case tok::kw___uuidof:
941 case tok::kw_##Spelling:
946 case tok::kw_char:
947 case tok::kw_const:
948 case tok::kw_double:
949 case tok::kw_enum:
950 case tok::kw_half:
951 case tok::kw_float:
952 case tok::kw_int:
953 case tok::kw_long:
954 case tok::kw___int64:
955 case tok::kw___int128:
956 case tok::kw_restrict:
957 case tok::kw_short:
958 case tok::kw_signed:
959 case tok::kw_struct:
960 case tok::kw_union:
961 case tok::kw_unsigned:
962 case tok::kw_void:
963 case tok::kw_volatile:
964 case tok::kw__Bool:
965 case tok::kw__Complex:
966 case tok::kw_class:
967 case tok::kw_typename:
968 case tok::kw_wchar_t:
969 case tok::kw_char16_t:
970 case tok::kw_char32_t:
971 case tok::kw__Decimal32:
972 case tok::kw__Decimal64:
973 case tok::kw__Decimal128:
974 case tok::kw___interface:
975 case tok::kw___thread:
976 case tok::kw_thread_local:
977 case tok::kw__Thread_local:
978 case tok::kw_typeof:
979 case tok::kw___underlying_type:
980 case tok::kw___cdecl:
981 case tok::kw___stdcall:
982 case tok::kw___fastcall:
983 case tok::kw___thiscall:
984 case tok::kw___vectorcall:
985 case tok::kw___unaligned:
986 case tok::kw___vector:
987 case tok::kw___pixel:
988 tok::kw___bool:
989 case tok::kw__Atomic:
990 case tok::kw___unknown_anytype:
1011 WantTypeSpecifiers = Next.isOneOf(tok::l_paren, tok::r_paren, tok::greater,
1012 tok::l_brace, tok::identifier);
1136 switch (Tok.getKind()) {
1137 case tok::identifier: {
1145 if (!getLangOpts().ObjC1 && Next.is(tok::identifier))
1148 if (Next.isNot(tok::coloncolon) && Next.isNot(tok::less)) {
1168 assert(Tok.isNot(tok::identifier) &&
1180 if (Tok.is(tok::identifier))
1188 case tok::kw_typename: // typename T::type
1195 case tok::coloncolon: { // ::foo::bar
1197 if (Next.isOneOf(tok::kw_new, // ::new
1198 tok::kw_delete)) // ::delete
1202 case tok::kw___super:
1203 case tok::kw_decltype:
1218 case tok::kw_friend:
1219 case tok::kw_typedef:
1220 case tok::kw_constexpr:
1221 case tok::kw_concept:
1223 case tok::kw_register:
1224 case tok::kw_static:
1225 case tok::kw_extern:
1226 case tok::kw_mutable:
1227 case tok::kw_auto:
1228 case tok::kw___thread:
1229 case tok::kw_thread_local:
1230 case tok::kw__Thread_local:
1232 case tok::kw_inline:
1233 case tok::kw_virtual:
1234 case tok::kw_explicit:
1237 case tok::kw___module_private__:
1240 case tok::kw___unknown_anytype:
1252 case tok::kw_class:
1253 case tok::kw_struct:
1254 case tok::kw_union:
1255 case tok::kw___interface:
1257 case tok::kw_enum:
1259 case tok::kw_const:
1260 case tok::kw_volatile:
1263 case tok::kw_restrict:
1264 case tok::kw__Complex:
1265 case tok::kw___attribute:
1266 case tok::kw___auto_type:
1270 case tok::kw___declspec:
1271 case tok::kw___cdecl:
1272 case tok::kw___stdcall:
1273 case tok::kw___fastcall:
1274 case tok::kw___thiscall:
1275 case tok::kw___vectorcall:
1276 case tok::kw___w64:
1277 case tok::kw___sptr:
1278 case tok::kw___uptr:
1279 case tok::kw___ptr64:
1280 case tok::kw___ptr32:
1281 case tok::kw___forceinline:
1282 case tok::kw___unaligned:
1283 case tok::kw__Nonnull:
1284 case tok::kw__Nullable:
1285 case tok::kw__Null_unspecified:
1286 case tok::kw___kindof:
1290 case tok::kw___pascal:
1294 case tok::kw___vector:
1297 case tok::annot_template_id: {
1298 TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok);
1303 assert(Tok.is(tok::annot_typename));
1307 case tok::annot_cxxscope: // foo::bar or ::foo::bar, but already parsed
1311 if (!Tok.is(tok::annot_typename)) {
1314 if (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::identifier)) {
1316 Actions.RestoreNestedNameSpecifierAnnotation(Tok.getAnnotationValue(),
1317 Tok.getAnnotationRange(),
1323 bool isIdentifier = Tok.is(tok::identifier);
1357 assert(Tok.isNot(tok::annot_cxxscope) ||
1358 NextToken().isNot(tok::identifier));
1386 case tok::annot_typename:
1389 if (getLangOpts().ObjC1 && NextToken().is(tok::less)) {
1395 bool isFollowedByParen = Tok.is(tok::l_paren);
1396 bool isFollowedByBrace = Tok.is(tok::l_brace);
1412 case tok::kw_char:
1413 case tok::kw_wchar_t:
1414 case tok::kw_char16_t:
1415 case tok::kw_char32_t:
1416 case tok::kw_bool:
1417 case tok::kw_short:
1418 case tok::kw_int:
1419 case tok::kw_long:
1420 case tok::kw___int64:
1421 case tok::kw___int128:
1422 case tok::kw_signed:
1423 case tok::kw_unsigned:
1424 case tok::kw_half:
1425 case tok::kw_float:
1426 case tok::kw_double:
1427 case tok::kw_void:
1428 case tok::annot_decltype:
1429 if (NextToken().is(tok::l_paren))
1438 if (getLangOpts().CPlusPlus11 && NextToken().is(tok::l_brace))
1447 case tok::kw_typeof: {
1448 if (NextToken().isNot(tok::l_paren))
1454 bool isFollowedByParen = Tok.is(tok::l_paren);
1455 bool isFollowedByBrace = Tok.is(tok::l_brace);
1472 case tok::kw___underlying_type:
1476 case tok::kw__Atomic:
1485 switch (Tok.getKind()) {
1487 case tok::annot_decltype:
1488 case tok::annot_template_id:
1489 case tok::annot_typename:
1490 case tok::kw_typeof:
1491 case tok::kw___underlying_type:
1495 case tok::kw_class:
1496 case tok::kw_struct:
1497 case tok::kw_union:
1498 case tok::kw___interface:
1499 case tok::kw_enum:
1503 tok::kw_char:
1504 case tok::kw_wchar_t:
1505 case tok::kw_char16_t:
1506 case tok::kw_char32_t:
1507 case tok::kw_bool:
1508 case tok::kw_short:
1509 case tok::kw_int:
1510 case tok::kw_long:
1511 case tok::kw___int64:
1512 case tok::kw___int128:
1513 case tok::kw_signed:
1514 case tok::kw_unsigned:
1515 case tok::kw_half:
1516 case tok::kw_float:
1517 case tok::kw_double:
1518 case tok::kw_void:
1519 case tok::kw___unknown_anytype:
1520 case tok::kw___auto_type:
1523 case tok::kw_auto:
1526 case tok::kw__Atomic:
1528 return NextToken().is(tok::l_paren);
1540 assert(Tok.is(tok::kw_typeof) && "Expected 'typeof'!");
1543 assert(Tok.is(tok::l_paren) && "Expected '('");
1546 if (!SkipUntil(tok::r_paren, StopAtSemi))
1555 assert(Tok.is(tok::less) && "Expected '<' for qualifier list");
1558 if (Tok.isNot(tok::identifier))
1562 if (Tok.is(tok::comma)) {
1567 if (Tok.is(tok::greater)) {
1603 if (Tok.isNot(tok::r_paren))
1607 if (Next.isOneOf(tok::amp, tok::ampamp, tok::kw_const, tok::kw_volatile,
1608 tok::kw_throw, tok::kw_noexcept, tok::l_square,
1609 tok::l_brace, tok::kw_try, tok::equal, tok::arrow) ||
1651 if (Tok.is(tok::r_paren))
1663 if (Tok.is(tok::ellipsis)) {
1665 if (Tok.is(tok::r_paren))
1695 if (SeenType && Tok.is(tok::identifier))
1717 if (Tok.is(tok::kw___attribute))
1731 return Tok.isOneOf(tok::equal, tok::r_paren) ? TPResult::True
1734 if (Tok.is(tok::equal)) {
1738 if (!SkipUntil(tok::comma, tok::r_paren, StopAtSemi | StopBeforeMatch))
1742 if (Tok.is(tok::ellipsis)) {
1744 if (Tok.is(tok::r_paren))
1750 if (!TryConsumeToken(tok::comma))
1774 if (TPR == TPResult::Ambiguous && Tok.isNot(tok::r_paren))
1781 if (!SkipUntil(tok::r_paren, StopAtSemi))
1785 while (Tok.isOneOf(tok::kw_const, tok::kw_volatile, tok::kw_restrict))
1789 if (Tok.isOneOf(tok::amp, tok::ampamp))
1793 if (Tok.is(tok::kw_throw)) {
1795 if (Tok.isNot(tok::l_paren))
1800 if (!SkipUntil(tok::r_paren, StopAtSemi))
1803 if (Tok.is(tok::kw_noexcept)) {
1806 if (Tok.is(tok::l_paren)) {
1809 if (!SkipUntil(tok::r_paren, StopAtSemi))
1821 if (!SkipUntil(tok::r_square, StopAtSemi))