• Home
  • Raw
  • Download

Lines Matching refs:tok

128   assert(Tok.is(tok::kw___attribute) && "Not a GNU attribute list!");  in ParseGNUAttributes()
130 while (Tok.is(tok::kw___attribute)) { in ParseGNUAttributes()
132 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, in ParseGNUAttributes()
134 SkipUntil(tok::r_paren, StopAtSemi); // skip until ) or ; in ParseGNUAttributes()
137 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, "(")) { in ParseGNUAttributes()
138 SkipUntil(tok::r_paren, StopAtSemi); // skip until ) or ; in ParseGNUAttributes()
144 if (TryConsumeToken(tok::comma)) in ParseGNUAttributes()
156 if (Tok.isNot(tok::l_paren)) { in ParseGNUAttributes()
180 ConsumeAndStoreUntil(tok::r_paren, LA->Toks, true, false); in ParseGNUAttributes()
188 if (ExpectAndConsume(tok::r_paren)) in ParseGNUAttributes()
189 SkipUntil(tok::r_paren, StopAtSemi); in ParseGNUAttributes()
191 if (ExpectAndConsume(tok::r_paren)) in ParseGNUAttributes()
192 SkipUntil(tok::r_paren, StopAtSemi); in ParseGNUAttributes()
234 assert(Tok.is(tok::identifier) && "expected an identifier"); in ParseIdentifierLoc()
249 BalancedDelimiterTracker Parens(*this, tok::l_paren); in ParseAttributeWithTypeArg()
253 if (Tok.isNot(tok::r_paren)) in ParseAttributeWithTypeArg()
279 if (Tok.is(tok::identifier)) { in ParseAttributeArgsCommon()
290 IsIdentifierArg = Next.isOneOf(tok::r_paren, tok::comma); in ParseAttributeArgsCommon()
297 if (!ArgExprs.empty() ? Tok.is(tok::comma) : Tok.isNot(tok::r_paren)) { in ParseAttributeArgsCommon()
312 SkipUntil(tok::r_paren, StopAtSemi); in ParseAttributeArgsCommon()
317 } while (TryConsumeToken(tok::comma)); in ParseAttributeArgsCommon()
321 if (!ExpectAndConsume(tok::r_paren)) { in ParseAttributeArgsCommon()
344 assert(Tok.is(tok::l_paren) && "Attribute arg list not starting with '('"); in ParseGNUAttributeArgs()
395 SkipUntil(tok::r_paren); in ParseMicrosoftDeclSpecArgs()
406 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseMicrosoftDeclSpecArgs()
408 AttrName->getNameStart(), tok::r_paren); in ParseMicrosoftDeclSpecArgs()
421 if (!Tok.is(tok::identifier)) { in ParseMicrosoftDeclSpecArgs()
423 if (Tok.is(tok::r_paren) && !HasInvalidAccessor && in ParseMicrosoftDeclSpecArgs()
450 } else if (NextToken().is(tok::comma) || NextToken().is(tok::r_paren)) { in ParseMicrosoftDeclSpecArgs()
463 if (!NextToken().is(tok::equal)) in ParseMicrosoftDeclSpecArgs()
471 if (!TryConsumeToken(tok::equal)) { in ParseMicrosoftDeclSpecArgs()
478 if (!Tok.is(tok::identifier)) { in ParseMicrosoftDeclSpecArgs()
495 if (TryConsumeToken(tok::comma)) in ParseMicrosoftDeclSpecArgs()
499 if (Tok.is(tok::r_paren)) in ParseMicrosoftDeclSpecArgs()
538 assert(Tok.is(tok::kw___declspec) && "Not a declspec!"); in ParseMicrosoftDeclSpecs()
540 while (Tok.is(tok::kw___declspec)) { in ParseMicrosoftDeclSpecs()
542 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseMicrosoftDeclSpecs()
544 tok::r_paren)) in ParseMicrosoftDeclSpecs()
549 while (Tok.isNot(tok::r_paren)) { in ParseMicrosoftDeclSpecs()
551 if (TryConsumeToken(tok::comma)) in ParseMicrosoftDeclSpecs()
556 bool IsString = Tok.getKind() == tok::string_literal; in ParseMicrosoftDeclSpecs()
557 if (!IsString && Tok.getKind() != tok::identifier && in ParseMicrosoftDeclSpecs()
558 Tok.getKind() != tok::kw_restrict) { in ParseMicrosoftDeclSpecs()
584 if (Tok.is(tok::l_paren)) in ParseMicrosoftDeclSpecs()
605 case tok::kw___fastcall: in ParseMicrosoftTypeAttributes()
606 case tok::kw___stdcall: in ParseMicrosoftTypeAttributes()
607 case tok::kw___thiscall: in ParseMicrosoftTypeAttributes()
608 case tok::kw___cdecl: in ParseMicrosoftTypeAttributes()
609 case tok::kw___vectorcall: in ParseMicrosoftTypeAttributes()
610 case tok::kw___ptr64: in ParseMicrosoftTypeAttributes()
611 case tok::kw___w64: in ParseMicrosoftTypeAttributes()
612 case tok::kw___ptr32: in ParseMicrosoftTypeAttributes()
613 case tok::kw___sptr: in ParseMicrosoftTypeAttributes()
614 case tok::kw___uptr: { in ParseMicrosoftTypeAttributes()
642 case tok::kw_const: in SkipExtendedMicrosoftTypeAttributes()
643 case tok::kw_volatile: in SkipExtendedMicrosoftTypeAttributes()
644 case tok::kw___fastcall: in SkipExtendedMicrosoftTypeAttributes()
645 case tok::kw___stdcall: in SkipExtendedMicrosoftTypeAttributes()
646 case tok::kw___thiscall: in SkipExtendedMicrosoftTypeAttributes()
647 case tok::kw___cdecl: in SkipExtendedMicrosoftTypeAttributes()
648 case tok::kw___vectorcall: in SkipExtendedMicrosoftTypeAttributes()
649 case tok::kw___ptr32: in SkipExtendedMicrosoftTypeAttributes()
650 case tok::kw___ptr64: in SkipExtendedMicrosoftTypeAttributes()
651 case tok::kw___w64: in SkipExtendedMicrosoftTypeAttributes()
652 case tok::kw___unaligned: in SkipExtendedMicrosoftTypeAttributes()
653 case tok::kw___sptr: in SkipExtendedMicrosoftTypeAttributes()
654 case tok::kw___uptr: in SkipExtendedMicrosoftTypeAttributes()
665 while (Tok.is(tok::kw___pascal)) { in ParseBorlandTypeAttributes()
675 while (Tok.is(tok::kw___kernel)) { in ParseOpenCLKernelAttributes()
694 case tok::kw__Nonnull: in ParseNullabilityTypeSpecifiers()
695 case tok::kw__Nullable: in ParseNullabilityTypeSpecifiers()
696 case tok::kw__Null_unspecified: { in ParseNullabilityTypeSpecifiers()
725 if (!Tok.is(tok::numeric_constant)) { in ParseVersionTuple()
727 SkipUntil(tok::comma, tok::r_paren, in ParseVersionTuple()
756 SkipUntil(tok::comma, tok::r_paren, in ParseVersionTuple()
777 SkipUntil(tok::comma, tok::r_paren, in ParseVersionTuple()
806 SkipUntil(tok::comma, tok::r_paren, in ParseVersionTuple()
825 SkipUntil(tok::comma, tok::r_paren, in ParseVersionTuple()
870 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseAvailabilityAttribute()
872 Diag(Tok, diag::err_expected) << tok::l_paren; in ParseAvailabilityAttribute()
877 if (Tok.isNot(tok::identifier)) { in ParseAvailabilityAttribute()
879 SkipUntil(tok::r_paren, StopAtSemi); in ParseAvailabilityAttribute()
892 if (ExpectAndConsume(tok::comma)) { in ParseAvailabilityAttribute()
893 SkipUntil(tok::r_paren, StopAtSemi); in ParseAvailabilityAttribute()
913 if (Tok.isNot(tok::identifier)) { in ParseAvailabilityAttribute()
915 SkipUntil(tok::r_paren, StopAtSemi); in ParseAvailabilityAttribute()
939 if (Tok.isNot(tok::equal)) { in ParseAvailabilityAttribute()
940 Diag(Tok, diag::err_expected_after) << Keyword << tok::equal; in ParseAvailabilityAttribute()
941 SkipUntil(tok::r_paren, StopAtSemi); in ParseAvailabilityAttribute()
946 if (Tok.isNot(tok::string_literal)) { in ParseAvailabilityAttribute()
949 SkipUntil(tok::r_paren, StopAtSemi); in ParseAvailabilityAttribute()
963 SkipUntil(tok::r_paren, StopAtSemi); in ParseAvailabilityAttribute()
976 Tok.is(tok::identifier)) { in ParseAvailabilityAttribute()
990 SkipUntil(tok::r_paren, StopAtSemi); in ParseAvailabilityAttribute()
1020 } while (TryConsumeToken(tok::comma)); in ParseAvailabilityAttribute()
1079 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseObjCBridgeRelatedAttribute()
1081 Diag(Tok, diag::err_expected) << tok::l_paren; in ParseObjCBridgeRelatedAttribute()
1086 if (Tok.isNot(tok::identifier)) { in ParseObjCBridgeRelatedAttribute()
1088 SkipUntil(tok::r_paren, StopAtSemi); in ParseObjCBridgeRelatedAttribute()
1092 if (ExpectAndConsume(tok::comma)) { in ParseObjCBridgeRelatedAttribute()
1093 SkipUntil(tok::r_paren, StopAtSemi); in ParseObjCBridgeRelatedAttribute()
1099 if (Tok.is(tok::identifier)) { in ParseObjCBridgeRelatedAttribute()
1101 if (!TryConsumeToken(tok::colon)) { in ParseObjCBridgeRelatedAttribute()
1103 SkipUntil(tok::r_paren, StopAtSemi); in ParseObjCBridgeRelatedAttribute()
1107 if (!TryConsumeToken(tok::comma)) { in ParseObjCBridgeRelatedAttribute()
1108 if (Tok.is(tok::colon)) in ParseObjCBridgeRelatedAttribute()
1111 Diag(Tok, diag::err_expected) << tok::comma; in ParseObjCBridgeRelatedAttribute()
1112 SkipUntil(tok::r_paren, StopAtSemi); in ParseObjCBridgeRelatedAttribute()
1118 if (Tok.is(tok::identifier)) in ParseObjCBridgeRelatedAttribute()
1120 else if (Tok.isNot(tok::r_paren)) { in ParseObjCBridgeRelatedAttribute()
1121 Diag(Tok, diag::err_expected) << tok::r_paren; in ParseObjCBridgeRelatedAttribute()
1122 SkipUntil(tok::r_paren, StopAtSemi); in ParseObjCBridgeRelatedAttribute()
1213 AttrEnd.setKind(tok::eof); in ParseLexedAttribute()
1283 while (Tok.isNot(tok::eof)) in ParseLexedAttribute()
1286 if (Tok.is(tok::eof) && Tok.getEofData() == AttrEnd.getEofData()) in ParseLexedAttribute()
1297 assert(Tok.is(tok::l_paren) && "Attribute arg list not starting with '('"); in ParseTypeTagForDatatypeAttribute()
1299 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseTypeTagForDatatypeAttribute()
1302 if (Tok.isNot(tok::identifier)) { in ParseTypeTagForDatatypeAttribute()
1303 Diag(Tok, diag::err_expected) << tok::identifier; in ParseTypeTagForDatatypeAttribute()
1309 if (ExpectAndConsume(tok::comma)) { in ParseTypeTagForDatatypeAttribute()
1323 while (TryConsumeToken(tok::comma)) { in ParseTypeTagForDatatypeAttribute()
1324 if (Tok.isNot(tok::identifier)) { in ParseTypeTagForDatatypeAttribute()
1325 Diag(Tok, diag::err_expected) << tok::identifier; in ParseTypeTagForDatatypeAttribute()
1361 assert(Tok.is(tok::l_square) && NextToken().is(tok::l_square)); in DiagnoseProhibitedCXX11Attribute()
1376 SkipUntil(tok::r_square); in DiagnoseProhibitedCXX11Attribute()
1377 assert(Tok.is(tok::r_square) && "isCXX11AttributeSpecifier lied"); in DiagnoseProhibitedCXX11Attribute()
1392 assert((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || in DiagnoseMisplacedCXX11Attribute()
1393 Tok.is(tok::kw_alignas)); in DiagnoseMisplacedCXX11Attribute()
1489 case tok::kw_template: in ParseDeclaration()
1490 case tok::kw_export: in ParseDeclaration()
1494 case tok::kw_inline: in ParseDeclaration()
1496 if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_namespace)) { in ParseDeclaration()
1503 case tok::kw_namespace: in ParseDeclaration()
1506 case tok::kw_using: in ParseDeclaration()
1510 case tok::kw_static_assert: in ParseDeclaration()
1511 case tok::kw__Static_assert: in ParseDeclaration()
1560 if (Tok.is(tok::semi)) { in ParseSimpleDeclaration()
1583 case tok::annot_cxxscope: in MightBeDeclarator()
1584 case tok::annot_template_id: in MightBeDeclarator()
1585 case tok::caret: in MightBeDeclarator()
1586 case tok::code_completion: in MightBeDeclarator()
1587 case tok::coloncolon: in MightBeDeclarator()
1588 case tok::ellipsis: in MightBeDeclarator()
1589 case tok::kw___attribute: in MightBeDeclarator()
1590 case tok::kw_operator: in MightBeDeclarator()
1591 case tok::l_paren: in MightBeDeclarator()
1592 case tok::star: in MightBeDeclarator()
1595 case tok::amp: in MightBeDeclarator()
1596 case tok::ampamp: in MightBeDeclarator()
1599 case tok::l_square: // Might be an attribute on an unnamed bit-field. in MightBeDeclarator()
1601 NextToken().is(tok::l_square); in MightBeDeclarator()
1603 case tok::colon: // Might be a typo for '::' or an unnamed bit-field. in MightBeDeclarator()
1606 case tok::identifier: in MightBeDeclarator()
1608 case tok::code_completion: in MightBeDeclarator()
1609 case tok::coloncolon: in MightBeDeclarator()
1610 case tok::comma: in MightBeDeclarator()
1611 case tok::equal: in MightBeDeclarator()
1612 case tok::equalequal: // Might be a typo for '='. in MightBeDeclarator()
1613 case tok::kw_alignas: in MightBeDeclarator()
1614 case tok::kw_asm: in MightBeDeclarator()
1615 case tok::kw___attribute: in MightBeDeclarator()
1616 case tok::l_brace: in MightBeDeclarator()
1617 case tok::l_paren: in MightBeDeclarator()
1618 case tok::l_square: in MightBeDeclarator()
1619 case tok::less: in MightBeDeclarator()
1620 case tok::r_brace: in MightBeDeclarator()
1621 case tok::r_paren: in MightBeDeclarator()
1622 case tok::r_square: in MightBeDeclarator()
1623 case tok::semi: in MightBeDeclarator()
1626 case tok::colon: in MightBeDeclarator()
1633 case tok::identifier: // Possible virt-specifier. in MightBeDeclarator()
1651 case tok::l_brace: in SkipMalformedDecl()
1655 SkipUntil(tok::r_brace); in SkipMalformedDecl()
1656 if (Tok.isOneOf(tok::comma, tok::l_brace, tok::kw_try)) { in SkipMalformedDecl()
1660 TryConsumeToken(tok::semi); in SkipMalformedDecl()
1663 case tok::l_square: in SkipMalformedDecl()
1665 SkipUntil(tok::r_square); in SkipMalformedDecl()
1668 case tok::l_paren: in SkipMalformedDecl()
1670 SkipUntil(tok::r_paren); in SkipMalformedDecl()
1673 case tok::r_brace: in SkipMalformedDecl()
1676 case tok::semi: in SkipMalformedDecl()
1680 case tok::kw_inline: in SkipMalformedDecl()
1684 if (Tok.isAtStartOfLine() && NextToken().is(tok::kw_namespace) && in SkipMalformedDecl()
1689 case tok::kw_namespace: in SkipMalformedDecl()
1698 case tok::at: in SkipMalformedDecl()
1700 if (NextToken().isObjCAtKeyword(tok::objc_end) && in SkipMalformedDecl()
1705 case tok::minus: in SkipMalformedDecl()
1706 case tok::plus: in SkipMalformedDecl()
1712 case tok::eof: in SkipMalformedDecl()
1713 case tok::annot_module_begin: in SkipMalformedDecl()
1714 case tok::annot_module_end: in SkipMalformedDecl()
1715 case tok::annot_module_include: in SkipMalformedDecl()
1753 if (Tok.is(tok::kw__Noreturn)) { in ParseDeclGroup()
1762 Fixit &= Tok.isOneOf(tok::semi, tok::l_brace, tok::kw_try); in ParseDeclGroup()
1804 SkipUntil(tok::semi); in ParseDeclGroup()
1808 if (Tok.is(tok::l_brace)) { in ParseDeclGroup()
1825 if (FRI && (Tok.is(tok::colon) || isTokIdentifier_in())) { in ParseDeclGroup()
1827 if (TryConsumeToken(tok::colon, FRI->ColonLoc)) { in ParseDeclGroup()
1829 if (Tok.is(tok::l_brace)) in ParseDeclGroup()
1857 while (TryConsumeToken(tok::comma, CommaLoc)) { in ParseDeclGroup()
1905 SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); in ParseDeclGroup()
1906 TryConsumeToken(tok::semi); in ParseDeclGroup()
1917 if (Tok.is(tok::kw_asm)) { in ParseAsmAttributesAfterDeclarator()
1921 SkipUntil(tok::semi, StopBeforeMatch); in ParseAsmAttributesAfterDeclarator()
1984 if (Tok.is(tok::semi)) { in ParseDeclarationAfterDeclaratorAndAttributes()
1988 SkipUntil(tok::semi, StopBeforeMatch); in ParseDeclarationAfterDeclaratorAndAttributes()
2031 if (Tok.is(tok::kw_delete)) { in ParseDeclarationAfterDeclaratorAndAttributes()
2037 } else if (Tok.is(tok::kw_default)) { in ParseDeclarationAfterDeclaratorAndAttributes()
2049 if (Tok.is(tok::code_completion)) { in ParseDeclarationAfterDeclaratorAndAttributes()
2060 if (Tok.is(tok::r_paren) && FRI && D.isFirstDeclarator()) { in ParseDeclarationAfterDeclaratorAndAttributes()
2076 SmallVector<tok::TokenKind, 2> StopTokens; in ParseDeclarationAfterDeclaratorAndAttributes()
2077 StopTokens.push_back(tok::comma); in ParseDeclarationAfterDeclaratorAndAttributes()
2080 StopTokens.push_back(tok::r_paren); in ParseDeclarationAfterDeclaratorAndAttributes()
2087 } else if (Tok.is(tok::l_paren)) { in ParseDeclarationAfterDeclaratorAndAttributes()
2089 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseDeclarationAfterDeclaratorAndAttributes()
2106 SkipUntil(tok::r_paren, StopAtSemi); in ParseDeclarationAfterDeclaratorAndAttributes()
2130 } else if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace) && in ParseDeclarationAfterDeclaratorAndAttributes()
2233 return T.isOneOf(tok::l_square, tok::l_paren, tok::r_paren, tok::semi, in isValidAfterIdentifierInDeclarator()
2234 tok::comma, tok::equal, tok::kw_asm, tok::l_brace, in isValidAfterIdentifierInDeclarator()
2235 tok::colon); in isValidAfterIdentifierInDeclarator()
2251 assert(Tok.is(tok::identifier) && "should have identifier"); in ParseImplicitInt()
2316 tok::TokenKind TagKind = tok::unknown; in ParseImplicitInt()
2321 TagName="enum" ; FixitTagName = "enum " ; TagKind=tok::kw_enum ;break; in ParseImplicitInt()
2323 TagName="union" ; FixitTagName = "union " ;TagKind=tok::kw_union ;break; in ParseImplicitInt()
2325 TagName="struct"; FixitTagName = "struct ";TagKind=tok::kw_struct;break; in ParseImplicitInt()
2328 TagKind=tok::kw___interface;break; in ParseImplicitInt()
2330 TagName="class" ; FixitTagName = "class " ;TagKind=tok::kw_class ;break; in ParseImplicitInt()
2350 if (TagKind == tok::kw_enum) in ParseImplicitInt()
2366 case tok::l_paren: { in ParseImplicitInt()
2397 case tok::comma: in ParseImplicitInt()
2398 case tok::equal: in ParseImplicitInt()
2399 case tok::kw_asm: in ParseImplicitInt()
2400 case tok::l_brace: in ParseImplicitInt()
2401 case tok::l_square: in ParseImplicitInt()
2402 case tok::semi: in ParseImplicitInt()
2423 NextToken().is(tok::less)); in ParseImplicitInt()
2497 TryConsumeToken(tok::ellipsis, EllipsisLoc); in ParseAlignArgument()
2512 assert(Tok.isOneOf(tok::kw_alignas, tok::kw__Alignas) && in ParseAlignmentSpecifier()
2518 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseAlignmentSpecifier()
2555 Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw_decltype, in DiagnoseMissingSemiAfterTagDefinition()
2556 tok::annot_template_id) && in DiagnoseMissingSemiAfterTagDefinition()
2562 bool HasScope = Tok.is(tok::annot_cxxscope); in DiagnoseMissingSemiAfterTagDefinition()
2569 if (Tok.isOneOf(tok::kw_typename, tok::annot_typename)) { in DiagnoseMissingSemiAfterTagDefinition()
2572 } else if (AfterScope.is(tok::annot_template_id)) { in DiagnoseMissingSemiAfterTagDefinition()
2579 } else if (AfterScope.is(tok::identifier)) { in DiagnoseMissingSemiAfterTagDefinition()
2584 if (Next.isOneOf(tok::star, tok::amp, tok::ampamp, tok::identifier, in DiagnoseMissingSemiAfterTagDefinition()
2585 tok::annot_cxxscope, tok::coloncolon)) { in DiagnoseMissingSemiAfterTagDefinition()
2631 << DeclSpec::getSpecifierName(DS.getTypeSpecType(), PPol) << tok::semi; in DiagnoseMissingSemiAfterTagDefinition()
2704 if (getLangOpts().MSVCCompat && Tok.is(tok::kw__Atomic) && in ParseDeclarationSpecifiers()
2706 !DS.hasTypeSpecifier() && GetLookAheadToken(1).is(tok::less)) in ParseDeclarationSpecifiers()
2707 Tok.setKind(tok::identifier); in ParseDeclarationSpecifiers()
2730 case tok::l_square: in ParseDeclarationSpecifiers()
2731 case tok::kw_alignas: in ParseDeclarationSpecifiers()
2746 case tok::code_completion: { in ParseDeclarationSpecifiers()
2779 case tok::coloncolon: // ::foo::bar in ParseDeclarationSpecifiers()
2786 if (Tok.is(tok::coloncolon)) // ::new or ::delete in ParseDeclarationSpecifiers()
2790 case tok::annot_cxxscope: { in ParseDeclarationSpecifiers()
2801 if (Next.is(tok::annot_template_id) && in ParseDeclarationSpecifiers()
2848 assert(Tok.is(tok::annot_template_id) && in ParseDeclarationSpecifiers()
2854 if (Next.is(tok::annot_typename)) { in ParseDeclarationSpecifiers()
2871 if (Next.isNot(tok::identifier)) in ParseDeclarationSpecifiers()
2930 case tok::annot_typename: { in ParseDeclarationSpecifiers()
2952 case tok::kw___is_signed: in ParseDeclarationSpecifiers()
2969 case tok::kw___super: in ParseDeclarationSpecifiers()
2970 case tok::kw_decltype: in ParseDeclarationSpecifiers()
2971 case tok::identifier: { in ParseDeclarationSpecifiers()
2985 if (!Tok.is(tok::identifier)) in ParseDeclarationSpecifiers()
3047 if (Tok.is(tok::less) && getLangOpts().ObjC1) { in ParseDeclarationSpecifiers()
3064 case tok::annot_template_id: { in ParseDeclarationSpecifiers()
3087 case tok::kw___attribute: in ParseDeclarationSpecifiers()
3092 case tok::kw___declspec: in ParseDeclarationSpecifiers()
3097 case tok::kw___forceinline: { in ParseDeclarationSpecifiers()
3106 case tok::kw___unaligned: in ParseDeclarationSpecifiers()
3111 case tok::kw___sptr: in ParseDeclarationSpecifiers()
3112 case tok::kw___uptr: in ParseDeclarationSpecifiers()
3113 case tok::kw___ptr64: in ParseDeclarationSpecifiers()
3114 case tok::kw___ptr32: in ParseDeclarationSpecifiers()
3115 case tok::kw___w64: in ParseDeclarationSpecifiers()
3116 case tok::kw___cdecl: in ParseDeclarationSpecifiers()
3117 case tok::kw___stdcall: in ParseDeclarationSpecifiers()
3118 case tok::kw___fastcall: in ParseDeclarationSpecifiers()
3119 case tok::kw___thiscall: in ParseDeclarationSpecifiers()
3120 case tok::kw___vectorcall: in ParseDeclarationSpecifiers()
3125 case tok::kw___pascal: in ParseDeclarationSpecifiers()
3130 case tok::kw___kernel: in ParseDeclarationSpecifiers()
3135 case tok::kw__Nonnull: in ParseDeclarationSpecifiers()
3136 case tok::kw__Nullable: in ParseDeclarationSpecifiers()
3137 case tok::kw__Null_unspecified: in ParseDeclarationSpecifiers()
3142 case tok::kw___kindof: in ParseDeclarationSpecifiers()
3149 case tok::kw_typedef: in ParseDeclarationSpecifiers()
3154 case tok::kw_extern: in ParseDeclarationSpecifiers()
3161 case tok::kw___private_extern__: in ParseDeclarationSpecifiers()
3166 case tok::kw_static: in ParseDeclarationSpecifiers()
3173 case tok::kw_auto: in ParseDeclarationSpecifiers()
3189 case tok::kw___auto_type: in ParseDeclarationSpecifiers()
3194 case tok::kw_register: in ParseDeclarationSpecifiers()
3199 case tok::kw_mutable: in ParseDeclarationSpecifiers()
3204 case tok::kw___thread: in ParseDeclarationSpecifiers()
3209 case tok::kw_thread_local: in ParseDeclarationSpecifiers()
3213 case tok::kw__Thread_local: in ParseDeclarationSpecifiers()
3220 case tok::kw_inline: in ParseDeclarationSpecifiers()
3223 case tok::kw_virtual: in ParseDeclarationSpecifiers()
3226 case tok::kw_explicit: in ParseDeclarationSpecifiers()
3229 case tok::kw__Noreturn: in ParseDeclarationSpecifiers()
3236 case tok::kw__Alignas: in ParseDeclarationSpecifiers()
3243 case tok::kw_friend: in ParseDeclarationSpecifiers()
3254 case tok::kw___module_private__: in ParseDeclarationSpecifiers()
3259 case tok::kw_constexpr: in ParseDeclarationSpecifiers()
3264 case tok::kw_concept: in ParseDeclarationSpecifiers()
3269 case tok::kw_short: in ParseDeclarationSpecifiers()
3273 case tok::kw_long: in ParseDeclarationSpecifiers()
3281 case tok::kw___int64: in ParseDeclarationSpecifiers()
3285 case tok::kw_signed: in ParseDeclarationSpecifiers()
3289 case tok::kw_unsigned: in ParseDeclarationSpecifiers()
3293 case tok::kw__Complex: in ParseDeclarationSpecifiers()
3297 case tok::kw__Imaginary: in ParseDeclarationSpecifiers()
3301 case tok::kw_void: in ParseDeclarationSpecifiers()
3305 case tok::kw_char: in ParseDeclarationSpecifiers()
3309 case tok::kw_int: in ParseDeclarationSpecifiers()
3313 case tok::kw___int128: in ParseDeclarationSpecifiers()
3317 case tok::kw_half: in ParseDeclarationSpecifiers()
3321 case tok::kw_float: in ParseDeclarationSpecifiers()
3325 case tok::kw_double: in ParseDeclarationSpecifiers()
3329 case tok::kw___float128: in ParseDeclarationSpecifiers()
3333 case tok::kw_wchar_t: in ParseDeclarationSpecifiers()
3337 case tok::kw_char16_t: in ParseDeclarationSpecifiers()
3341 case tok::kw_char32_t: in ParseDeclarationSpecifiers()
3345 case tok::kw_bool: in ParseDeclarationSpecifiers()
3346 case tok::kw__Bool: in ParseDeclarationSpecifiers()
3347 if (Tok.is(tok::kw_bool) && in ParseDeclarationSpecifiers()
3353 Tok.setKind(tok::identifier); in ParseDeclarationSpecifiers()
3360 case tok::kw__Decimal32: in ParseDeclarationSpecifiers()
3364 case tok::kw__Decimal64: in ParseDeclarationSpecifiers()
3368 case tok::kw__Decimal128: in ParseDeclarationSpecifiers()
3372 case tok::kw___vector: in ParseDeclarationSpecifiers()
3375 case tok::kw___pixel: in ParseDeclarationSpecifiers()
3378 case tok::kw___bool: in ParseDeclarationSpecifiers()
3381 case tok::kw_pipe: in ParseDeclarationSpecifiers()
3391 case tok::kw_##ImgType##_t: \ in ParseDeclarationSpecifiers()
3396 case tok::kw___unknown_anytype: in ParseDeclarationSpecifiers()
3402 case tok::kw_class: in ParseDeclarationSpecifiers()
3403 case tok::kw_struct: in ParseDeclarationSpecifiers()
3404 case tok::kw___interface: in ParseDeclarationSpecifiers()
3405 case tok::kw_union: { in ParseDeclarationSpecifiers()
3406 tok::TokenKind Kind = Tok.getKind(); in ParseDeclarationSpecifiers()
3426 case tok::kw_enum: in ParseDeclarationSpecifiers()
3432 case tok::kw_const: in ParseDeclarationSpecifiers()
3436 case tok::kw_volatile: in ParseDeclarationSpecifiers()
3440 case tok::kw_restrict: in ParseDeclarationSpecifiers()
3446 case tok::kw_typename: in ParseDeclarationSpecifiers()
3451 if (!Tok.is(tok::kw_typename)) in ParseDeclarationSpecifiers()
3456 case tok::kw_typeof: in ParseDeclarationSpecifiers()
3460 case tok::annot_decltype: in ParseDeclarationSpecifiers()
3464 case tok::annot_pragma_pack: in ParseDeclarationSpecifiers()
3468 case tok::annot_pragma_ms_pragma: in ParseDeclarationSpecifiers()
3472 case tok::annot_pragma_ms_vtordisp: in ParseDeclarationSpecifiers()
3476 case tok::annot_pragma_ms_pointers_to_members: in ParseDeclarationSpecifiers()
3480 case tok::kw___underlying_type: in ParseDeclarationSpecifiers()
3484 case tok::kw__Atomic: in ParseDeclarationSpecifiers()
3489 if (NextToken().is(tok::l_paren)) { in ParseDeclarationSpecifiers()
3498 case tok::kw___generic: in ParseDeclarationSpecifiers()
3507 case tok::kw___private: in ParseDeclarationSpecifiers()
3508 case tok::kw___global: in ParseDeclarationSpecifiers()
3509 case tok::kw___local: in ParseDeclarationSpecifiers()
3510 case tok::kw___constant: in ParseDeclarationSpecifiers()
3511 case tok::kw___read_only: in ParseDeclarationSpecifiers()
3512 case tok::kw___write_only: in ParseDeclarationSpecifiers()
3513 case tok::kw___read_write: in ParseDeclarationSpecifiers()
3517 case tok::less: in ParseDeclarationSpecifiers()
3589 if (Tok.is(tok::kw___extension__)) { in ParseStructDeclaration()
3601 if (Tok.is(tok::semi)) { in ParseStructDeclaration()
3623 if (Tok.isNot(tok::colon)) { in ParseStructDeclaration()
3630 if (TryConsumeToken(tok::colon)) { in ParseStructDeclaration()
3633 SkipUntil(tok::semi, StopBeforeMatch); in ParseStructDeclaration()
3646 if (!TryConsumeToken(tok::comma, CommaLoc)) in ParseStructDeclaration()
3669 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseStructUnionBody()
3679 while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && in ParseStructUnionBody()
3680 Tok.isNot(tok::eof)) { in ParseStructUnionBody()
3684 if (Tok.is(tok::semi)) { in ParseStructUnionBody()
3690 if (Tok.is(tok::kw__Static_assert)) { in ParseStructUnionBody()
3696 if (Tok.is(tok::annot_pragma_pack)) { in ParseStructUnionBody()
3701 if (Tok.is(tok::annot_pragma_align)) { in ParseStructUnionBody()
3706 if (Tok.is(tok::annot_pragma_openmp)) { in ParseStructUnionBody()
3714 if (!Tok.is(tok::at)) { in ParseStructUnionBody()
3730 if (!Tok.isObjCAtKeyword(tok::objc_defs)) { in ParseStructUnionBody()
3732 SkipUntil(tok::semi); in ParseStructUnionBody()
3736 ExpectAndConsume(tok::l_paren); in ParseStructUnionBody()
3737 if (!Tok.is(tok::identifier)) { in ParseStructUnionBody()
3738 Diag(Tok, diag::err_expected) << tok::identifier; in ParseStructUnionBody()
3739 SkipUntil(tok::semi); in ParseStructUnionBody()
3747 ExpectAndConsume(tok::r_paren); in ParseStructUnionBody()
3750 if (TryConsumeToken(tok::semi)) in ParseStructUnionBody()
3753 if (Tok.is(tok::r_brace)) { in ParseStructUnionBody()
3754 ExpectAndConsume(tok::semi, diag::ext_expected_semi_decl_list); in ParseStructUnionBody()
3758 ExpectAndConsume(tok::semi, diag::err_expected_semi_decl_list); in ParseStructUnionBody()
3760 SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); in ParseStructUnionBody()
3762 TryConsumeToken(tok::semi); in ParseStructUnionBody()
3814 if (Tok.is(tok::code_completion)) { in ParseEnumSpecifier()
3830 if (Tok.isOneOf(tok::kw_class, tok::kw_struct)) { in ParseEnumSpecifier()
3833 IsScopedUsingClassTag = Tok.is(tok::kw_class); in ParseEnumSpecifier()
3875 if (Spec.isSet() && Tok.isNot(tok::identifier)) { in ParseEnumSpecifier()
3876 Diag(Tok, diag::err_expected) << tok::identifier; in ParseEnumSpecifier()
3877 if (Tok.isNot(tok::l_brace)) { in ParseEnumSpecifier()
3880 SkipUntil(tok::comma, StopAtSemi); in ParseEnumSpecifier()
3889 if (Tok.isNot(tok::identifier) && Tok.isNot(tok::l_brace) && in ParseEnumSpecifier()
3890 !(AllowFixedUnderlyingType && Tok.is(tok::colon))) { in ParseEnumSpecifier()
3891 Diag(Tok, diag::err_expected_either) << tok::identifier << tok::l_brace; in ParseEnumSpecifier()
3894 SkipUntil(tok::comma, StopAtSemi); in ParseEnumSpecifier()
3901 if (Tok.is(tok::identifier)) { in ParseEnumSpecifier()
3923 if (AllowFixedUnderlyingType && Tok.is(tok::colon)) { in ParseEnumSpecifier()
3945 GetLookAheadToken(2).getKind() == tok::semi) { in ParseEnumSpecifier()
4007 } else if (Tok.is(tok::l_brace)) { in ParseEnumSpecifier()
4012 SkipUntil(tok::r_brace, StopAtSemi); in ParseEnumSpecifier()
4018 (Tok.is(tok::semi) || in ParseEnumSpecifier()
4022 if (Tok.isNot(tok::semi)) { in ParseEnumSpecifier()
4024 ExpectAndConsume(tok::semi, diag::err_expected_after, "enum"); in ParseEnumSpecifier()
4026 Tok.setKind(tok::semi); in ParseEnumSpecifier()
4044 SkipUntil(tok::comma, StopAtSemi); in ParseEnumSpecifier()
4067 SkipUntil(tok::comma, StopAtSemi); in ParseEnumSpecifier()
4074 if (!Name && TUK == Sema::TUK_Definition && Tok.is(tok::l_brace) && in ParseEnumSpecifier()
4075 NextToken().is(tok::identifier)) in ParseEnumSpecifier()
4094 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseEnumSpecifier()
4134 if (Tok.is(tok::l_brace) && TUK != Sema::TUK_Reference) { in ParseEnumSpecifier()
4136 SkipUntil(tok::r_brace, StopAtSemi); in ParseEnumSpecifier()
4143 if (Tok.is(tok::l_brace) && TUK != Sema::TUK_Reference) in ParseEnumSpecifier()
4168 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseEnumBody()
4172 if (Tok.is(tok::r_brace) && !getLangOpts().CPlusPlus) in ParseEnumBody()
4181 while (Tok.isNot(tok::r_brace)) { in ParseEnumBody()
4184 if (Tok.isNot(tok::identifier)) { in ParseEnumBody()
4185 Diag(Tok.getLocation(), diag::err_expected) << tok::identifier; in ParseEnumBody()
4186 if (SkipUntil(tok::comma, tok::r_brace, StopBeforeMatch) && in ParseEnumBody()
4187 TryConsumeToken(tok::comma)) in ParseEnumBody()
4209 if (TryConsumeToken(tok::equal, EqualLoc)) { in ParseEnumBody()
4212 SkipUntil(tok::comma, tok::r_brace, StopBeforeMatch); in ParseEnumBody()
4226 if (Tok.is(tok::identifier)) { in ParseEnumBody()
4237 if (Tok.isNot(tok::r_brace) && !TryConsumeToken(tok::comma, CommaLoc)) { in ParseEnumBody()
4239 Diag(Tok.getLocation(), diag::err_expected_either) << tok::r_brace in ParseEnumBody()
4240 << tok::comma; in ParseEnumBody()
4243 if (SkipUntil(tok::comma, tok::r_brace, StopBeforeMatch)) { in ParseEnumBody()
4244 if (TryConsumeToken(tok::comma, CommaLoc)) in ParseEnumBody()
4252 if (Tok.is(tok::r_brace) && CommaLoc.isValid()) { in ParseEnumBody()
4293 ExpectAndConsume(tok::semi, diag::err_expected_after, "enum"); in ParseEnumBody()
4298 Tok.setKind(tok::semi); in ParseEnumBody()
4309 case tok::kw_short: in isKnownToBeTypeSpecifier()
4310 case tok::kw_long: in isKnownToBeTypeSpecifier()
4311 case tok::kw___int64: in isKnownToBeTypeSpecifier()
4312 case tok::kw___int128: in isKnownToBeTypeSpecifier()
4313 case tok::kw_signed: in isKnownToBeTypeSpecifier()
4314 case tok::kw_unsigned: in isKnownToBeTypeSpecifier()
4315 case tok::kw__Complex: in isKnownToBeTypeSpecifier()
4316 case tok::kw__Imaginary: in isKnownToBeTypeSpecifier()
4317 case tok::kw_void: in isKnownToBeTypeSpecifier()
4318 case tok::kw_char: in isKnownToBeTypeSpecifier()
4319 case tok::kw_wchar_t: in isKnownToBeTypeSpecifier()
4320 case tok::kw_char16_t: in isKnownToBeTypeSpecifier()
4321 case tok::kw_char32_t: in isKnownToBeTypeSpecifier()
4322 case tok::kw_int: in isKnownToBeTypeSpecifier()
4323 case tok::kw_half: in isKnownToBeTypeSpecifier()
4324 case tok::kw_float: in isKnownToBeTypeSpecifier()
4325 case tok::kw_double: in isKnownToBeTypeSpecifier()
4326 case tok::kw___float128: in isKnownToBeTypeSpecifier()
4327 case tok::kw_bool: in isKnownToBeTypeSpecifier()
4328 case tok::kw__Bool: in isKnownToBeTypeSpecifier()
4329 case tok::kw__Decimal32: in isKnownToBeTypeSpecifier()
4330 case tok::kw__Decimal64: in isKnownToBeTypeSpecifier()
4331 case tok::kw__Decimal128: in isKnownToBeTypeSpecifier()
4332 case tok::kw___vector: in isKnownToBeTypeSpecifier()
4333 #define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: in isKnownToBeTypeSpecifier()
4337 case tok::kw_class: in isKnownToBeTypeSpecifier()
4338 case tok::kw_struct: in isKnownToBeTypeSpecifier()
4339 case tok::kw___interface: in isKnownToBeTypeSpecifier()
4340 case tok::kw_union: in isKnownToBeTypeSpecifier()
4342 case tok::kw_enum: in isKnownToBeTypeSpecifier()
4345 case tok::annot_typename: in isKnownToBeTypeSpecifier()
4356 case tok::identifier: // foo::bar in isTypeSpecifierQualifier()
4360 case tok::kw_typename: // typename T::type in isTypeSpecifierQualifier()
4365 if (Tok.is(tok::identifier)) in isTypeSpecifierQualifier()
4369 case tok::coloncolon: // ::foo::bar in isTypeSpecifierQualifier()
4370 if (NextToken().is(tok::kw_new) || // ::new in isTypeSpecifierQualifier()
4371 NextToken().is(tok::kw_delete)) // ::delete in isTypeSpecifierQualifier()
4379 case tok::kw___attribute: in isTypeSpecifierQualifier()
4381 case tok::kw_typeof: in isTypeSpecifierQualifier()
4384 case tok::kw_short: in isTypeSpecifierQualifier()
4385 case tok::kw_long: in isTypeSpecifierQualifier()
4386 case tok::kw___int64: in isTypeSpecifierQualifier()
4387 case tok::kw___int128: in isTypeSpecifierQualifier()
4388 case tok::kw_signed: in isTypeSpecifierQualifier()
4389 case tok::kw_unsigned: in isTypeSpecifierQualifier()
4390 case tok::kw__Complex: in isTypeSpecifierQualifier()
4391 case tok::kw__Imaginary: in isTypeSpecifierQualifier()
4392 case tok::kw_void: in isTypeSpecifierQualifier()
4393 case tok::kw_char: in isTypeSpecifierQualifier()
4394 case tok::kw_wchar_t: in isTypeSpecifierQualifier()
4395 case tok::kw_char16_t: in isTypeSpecifierQualifier()
4396 case tok::kw_char32_t: in isTypeSpecifierQualifier()
4397 case tok::kw_int: in isTypeSpecifierQualifier()
4398 case tok::kw_half: in isTypeSpecifierQualifier()
4399 case tok::kw_float: in isTypeSpecifierQualifier()
4400 case tok::kw_double: in isTypeSpecifierQualifier()
4401 case tok::kw___float128: in isTypeSpecifierQualifier()
4402 case tok::kw_bool: in isTypeSpecifierQualifier()
4403 case tok::kw__Bool: in isTypeSpecifierQualifier()
4404 case tok::kw__Decimal32: in isTypeSpecifierQualifier()
4405 case tok::kw__Decimal64: in isTypeSpecifierQualifier()
4406 case tok::kw__Decimal128: in isTypeSpecifierQualifier()
4407 case tok::kw___vector: in isTypeSpecifierQualifier()
4408 #define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: in isTypeSpecifierQualifier()
4412 case tok::kw_class: in isTypeSpecifierQualifier()
4413 case tok::kw_struct: in isTypeSpecifierQualifier()
4414 case tok::kw___interface: in isTypeSpecifierQualifier()
4415 case tok::kw_union: in isTypeSpecifierQualifier()
4417 case tok::kw_enum: in isTypeSpecifierQualifier()
4420 case tok::kw_const: in isTypeSpecifierQualifier()
4421 case tok::kw_volatile: in isTypeSpecifierQualifier()
4422 case tok::kw_restrict: in isTypeSpecifierQualifier()
4425 case tok::kw___unknown_anytype: in isTypeSpecifierQualifier()
4428 case tok::annot_typename: in isTypeSpecifierQualifier()
4432 case tok::less: in isTypeSpecifierQualifier()
4435 case tok::kw___cdecl: in isTypeSpecifierQualifier()
4436 case tok::kw___stdcall: in isTypeSpecifierQualifier()
4437 case tok::kw___fastcall: in isTypeSpecifierQualifier()
4438 case tok::kw___thiscall: in isTypeSpecifierQualifier()
4439 case tok::kw___vectorcall: in isTypeSpecifierQualifier()
4440 case tok::kw___w64: in isTypeSpecifierQualifier()
4441 case tok::kw___ptr64: in isTypeSpecifierQualifier()
4442 case tok::kw___ptr32: in isTypeSpecifierQualifier()
4443 case tok::kw___pascal: in isTypeSpecifierQualifier()
4444 case tok::kw___unaligned: in isTypeSpecifierQualifier()
4446 case tok::kw__Nonnull: in isTypeSpecifierQualifier()
4447 case tok::kw__Nullable: in isTypeSpecifierQualifier()
4448 case tok::kw__Null_unspecified: in isTypeSpecifierQualifier()
4450 case tok::kw___kindof: in isTypeSpecifierQualifier()
4452 case tok::kw___private: in isTypeSpecifierQualifier()
4453 case tok::kw___local: in isTypeSpecifierQualifier()
4454 case tok::kw___global: in isTypeSpecifierQualifier()
4455 case tok::kw___constant: in isTypeSpecifierQualifier()
4456 case tok::kw___generic: in isTypeSpecifierQualifier()
4457 case tok::kw___read_only: in isTypeSpecifierQualifier()
4458 case tok::kw___read_write: in isTypeSpecifierQualifier()
4459 case tok::kw___write_only: in isTypeSpecifierQualifier()
4464 case tok::kw__Atomic: in isTypeSpecifierQualifier()
4478 case tok::kw_pipe: in isDeclarationSpecifier()
4481 case tok::identifier: // foo::bar in isDeclarationSpecifier()
4483 if (getLangOpts().ObjC1 && NextToken().is(tok::period)) in isDeclarationSpecifier()
4488 case tok::kw_decltype: // decltype(T())::type in isDeclarationSpecifier()
4489 case tok::kw_typename: // typename T::type in isDeclarationSpecifier()
4494 if (Tok.is(tok::identifier)) in isDeclarationSpecifier()
4508 case tok::coloncolon: // ::foo::bar in isDeclarationSpecifier()
4509 if (NextToken().is(tok::kw_new) || // ::new in isDeclarationSpecifier()
4510 NextToken().is(tok::kw_delete)) // ::delete in isDeclarationSpecifier()
4520 case tok::kw_typedef: in isDeclarationSpecifier()
4521 case tok::kw_extern: in isDeclarationSpecifier()
4522 case tok::kw___private_extern__: in isDeclarationSpecifier()
4523 case tok::kw_static: in isDeclarationSpecifier()
4524 case tok::kw_auto: in isDeclarationSpecifier()
4525 case tok::kw___auto_type: in isDeclarationSpecifier()
4526 case tok::kw_register: in isDeclarationSpecifier()
4527 case tok::kw___thread: in isDeclarationSpecifier()
4528 case tok::kw_thread_local: in isDeclarationSpecifier()
4529 case tok::kw__Thread_local: in isDeclarationSpecifier()
4532 case tok::kw___module_private__: in isDeclarationSpecifier()
4535 case tok::kw___unknown_anytype: in isDeclarationSpecifier()
4538 case tok::kw_short: in isDeclarationSpecifier()
4539 case tok::kw_long: in isDeclarationSpecifier()
4540 case tok::kw___int64: in isDeclarationSpecifier()
4541 case tok::kw___int128: in isDeclarationSpecifier()
4542 case tok::kw_signed: in isDeclarationSpecifier()
4543 case tok::kw_unsigned: in isDeclarationSpecifier()
4544 case tok::kw__Complex: in isDeclarationSpecifier()
4545 case tok::kw__Imaginary: in isDeclarationSpecifier()
4546 case tok::kw_void: in isDeclarationSpecifier()
4547 case tok::kw_char: in isDeclarationSpecifier()
4548 case tok::kw_wchar_t: in isDeclarationSpecifier()
4549 case tok::kw_char16_t: in isDeclarationSpecifier()
4550 case tok::kw_char32_t: in isDeclarationSpecifier()
4552 case tok::kw_int: in isDeclarationSpecifier()
4553 case tok::kw_half: in isDeclarationSpecifier()
4554 case tok::kw_float: in isDeclarationSpecifier()
4555 case tok::kw_double: in isDeclarationSpecifier()
4556 case tok::kw___float128: in isDeclarationSpecifier()
4557 case tok::kw_bool: in isDeclarationSpecifier()
4558 case tok::kw__Bool: in isDeclarationSpecifier()
4559 case tok::kw__Decimal32: in isDeclarationSpecifier()
4560 case tok::kw__Decimal64: in isDeclarationSpecifier()
4561 case tok::kw__Decimal128: in isDeclarationSpecifier()
4562 case tok::kw___vector: in isDeclarationSpecifier()
4565 case tok::kw_class: in isDeclarationSpecifier()
4566 case tok::kw_struct: in isDeclarationSpecifier()
4567 case tok::kw_union: in isDeclarationSpecifier()
4568 case tok::kw___interface: in isDeclarationSpecifier()
4570 case tok::kw_enum: in isDeclarationSpecifier()
4573 case tok::kw_const: in isDeclarationSpecifier()
4574 case tok::kw_volatile: in isDeclarationSpecifier()
4575 case tok::kw_restrict: in isDeclarationSpecifier()
4578 case tok::kw_inline: in isDeclarationSpecifier()
4579 case tok::kw_virtual: in isDeclarationSpecifier()
4580 case tok::kw_explicit: in isDeclarationSpecifier()
4581 case tok::kw__Noreturn: in isDeclarationSpecifier()
4584 case tok::kw__Alignas: in isDeclarationSpecifier()
4587 case tok::kw_friend: in isDeclarationSpecifier()
4590 case tok::kw__Static_assert: in isDeclarationSpecifier()
4593 case tok::kw_typeof: in isDeclarationSpecifier()
4596 case tok::kw___attribute: in isDeclarationSpecifier()
4599 case tok::annot_decltype: in isDeclarationSpecifier()
4600 case tok::kw_constexpr: in isDeclarationSpecifier()
4603 case tok::kw_concept: in isDeclarationSpecifier()
4606 case tok::kw__Atomic: in isDeclarationSpecifier()
4610 case tok::less: in isDeclarationSpecifier()
4614 case tok::annot_typename: in isDeclarationSpecifier()
4618 case tok::kw___declspec: in isDeclarationSpecifier()
4619 case tok::kw___cdecl: in isDeclarationSpecifier()
4620 case tok::kw___stdcall: in isDeclarationSpecifier()
4621 case tok::kw___fastcall: in isDeclarationSpecifier()
4622 case tok::kw___thiscall: in isDeclarationSpecifier()
4623 case tok::kw___vectorcall: in isDeclarationSpecifier()
4624 case tok::kw___w64: in isDeclarationSpecifier()
4625 case tok::kw___sptr: in isDeclarationSpecifier()
4626 case tok::kw___uptr: in isDeclarationSpecifier()
4627 case tok::kw___ptr64: in isDeclarationSpecifier()
4628 case tok::kw___ptr32: in isDeclarationSpecifier()
4629 case tok::kw___forceinline: in isDeclarationSpecifier()
4630 case tok::kw___pascal: in isDeclarationSpecifier()
4631 case tok::kw___unaligned: in isDeclarationSpecifier()
4633 case tok::kw__Nonnull: in isDeclarationSpecifier()
4634 case tok::kw__Nullable: in isDeclarationSpecifier()
4635 case tok::kw__Null_unspecified: in isDeclarationSpecifier()
4637 case tok::kw___kindof: in isDeclarationSpecifier()
4639 case tok::kw___private: in isDeclarationSpecifier()
4640 case tok::kw___local: in isDeclarationSpecifier()
4641 case tok::kw___global: in isDeclarationSpecifier()
4642 case tok::kw___constant: in isDeclarationSpecifier()
4643 case tok::kw___generic: in isDeclarationSpecifier()
4644 case tok::kw___read_only: in isDeclarationSpecifier()
4645 case tok::kw___read_write: in isDeclarationSpecifier()
4646 case tok::kw___write_only: in isDeclarationSpecifier()
4647 #define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: in isDeclarationSpecifier()
4666 if (Tok.isOneOf(tok::identifier, tok::annot_template_id)) { in isConstructorDeclarator()
4676 if (Tok.isNot(tok::l_paren)) { in isConstructorDeclarator()
4684 if (Tok.is(tok::r_paren) || in isConstructorDeclarator()
4685 (Tok.is(tok::ellipsis) && NextToken().is(tok::r_paren))) { in isConstructorDeclarator()
4714 else if (Tok.is(tok::identifier) || in isConstructorDeclarator()
4715 (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::identifier))) { in isConstructorDeclarator()
4720 if (Tok.is(tok::annot_cxxscope)) in isConstructorDeclarator()
4728 case tok::l_paren: in isConstructorDeclarator()
4730 case tok::l_square: in isConstructorDeclarator()
4733 case tok::coloncolon: in isConstructorDeclarator()
4740 case tok::r_paren: in isConstructorDeclarator()
4742 if (NextToken().is(tok::colon) || NextToken().is(tok::kw_try)) { in isConstructorDeclarator()
4748 if (NextToken().is(tok::semi) || NextToken().is(tok::l_brace)) { in isConstructorDeclarator()
4806 case tok::code_completion: in ParseTypeQualifierListOpt()
4810 case tok::kw_const: in ParseTypeQualifierListOpt()
4814 case tok::kw_volatile: in ParseTypeQualifierListOpt()
4818 case tok::kw_restrict: in ParseTypeQualifierListOpt()
4822 case tok::kw__Atomic: in ParseTypeQualifierListOpt()
4830 case tok::kw___private: in ParseTypeQualifierListOpt()
4831 case tok::kw___global: in ParseTypeQualifierListOpt()
4832 case tok::kw___local: in ParseTypeQualifierListOpt()
4833 case tok::kw___constant: in ParseTypeQualifierListOpt()
4834 case tok::kw___generic: in ParseTypeQualifierListOpt()
4835 case tok::kw___read_only: in ParseTypeQualifierListOpt()
4836 case tok::kw___write_only: in ParseTypeQualifierListOpt()
4837 case tok::kw___read_write: in ParseTypeQualifierListOpt()
4841 case tok::kw___unaligned: in ParseTypeQualifierListOpt()
4845 case tok::kw___uptr: in ParseTypeQualifierListOpt()
4849 IdentifierRequired && DS.isEmpty() && NextToken().is(tok::semi)) { in ParseTypeQualifierListOpt()
4853 case tok::kw___sptr: in ParseTypeQualifierListOpt()
4854 case tok::kw___w64: in ParseTypeQualifierListOpt()
4855 case tok::kw___ptr64: in ParseTypeQualifierListOpt()
4856 case tok::kw___ptr32: in ParseTypeQualifierListOpt()
4857 case tok::kw___cdecl: in ParseTypeQualifierListOpt()
4858 case tok::kw___stdcall: in ParseTypeQualifierListOpt()
4859 case tok::kw___fastcall: in ParseTypeQualifierListOpt()
4860 case tok::kw___thiscall: in ParseTypeQualifierListOpt()
4861 case tok::kw___vectorcall: in ParseTypeQualifierListOpt()
4867 case tok::kw___pascal: in ParseTypeQualifierListOpt()
4875 case tok::kw__Nonnull: in ParseTypeQualifierListOpt()
4876 case tok::kw__Nullable: in ParseTypeQualifierListOpt()
4877 case tok::kw__Null_unspecified: in ParseTypeQualifierListOpt()
4882 case tok::kw___kindof: in ParseTypeQualifierListOpt()
4888 case tok::kw___attribute: in ParseTypeQualifierListOpt()
4928 static bool isPtrOperatorToken(tok::TokenKind Kind, const LangOptions &Lang, in isPtrOperatorToken()
4930 if (Kind == tok::star || Kind == tok::caret) in isPtrOperatorToken()
4933 if ((Kind == tok::kw_pipe) && Lang.OpenCL && (Lang.OpenCLVersion >= 200)) in isPtrOperatorToken()
4939 if (Kind == tok::amp) in isPtrOperatorToken()
4947 if (Kind == tok::ampamp) in isPtrOperatorToken()
4999 (Tok.is(tok::coloncolon) || Tok.is(tok::kw_decltype) || in ParseDeclaratorInternal()
5000 (Tok.is(tok::identifier) && in ParseDeclaratorInternal()
5001 (NextToken().is(tok::coloncolon) || NextToken().is(tok::less))) || in ParseDeclaratorInternal()
5002 Tok.is(tok::annot_cxxscope))) { in ParseDeclaratorInternal()
5009 if (Tok.isNot(tok::star)) { in ParseDeclaratorInternal()
5040 tok::TokenKind Kind = Tok.getKind(); in ParseDeclaratorInternal()
5063 if (Kind == tok::star || Kind == tok::caret) { in ParseDeclaratorInternal()
5078 if (Kind == tok::star) in ParseDeclaratorInternal()
5100 if (Kind == tok::ampamp) in ParseDeclaratorInternal()
5147 Kind == tok::amp), in ParseDeclaratorInternal()
5242 if (Tok.is(tok::ellipsis) && D.getCXXScopeSpec().isEmpty() && in ParseDirectDeclarator()
5246 NextToken().is(tok::r_paren) && in ParseDirectDeclarator()
5266 if (Tok.isOneOf(tok::identifier, tok::kw_operator, tok::annot_template_id, in ParseDirectDeclarator()
5267 tok::tilde)) { in ParseDirectDeclarator()
5315 } else if (Tok.is(tok::identifier) && D.mayHaveIdentifier()) { in ParseDirectDeclarator()
5323 } else if (Tok.is(tok::identifier) && D.diagnoseIdentifier()) { in ParseDirectDeclarator()
5336 if (Tok.is(tok::l_paren)) { in ParseDirectDeclarator()
5366 if (Tok.getKind() == tok::annot_pragma_parser_crash) in ParseDirectDeclarator()
5368 if (Tok.is(tok::l_square)) in ParseDirectDeclarator()
5376 if (Tok.isOneOf(tok::period, tok::arrow)) in ParseDirectDeclarator()
5377 Diag(Tok, diag::err_invalid_operator_on_type) << Tok.is(tok::arrow); in ParseDirectDeclarator()
5391 << tok::identifier << tok::l_paren; in ParseDirectDeclarator()
5406 if (Tok.is(tok::l_paren)) { in ParseDirectDeclarator()
5428 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseDirectDeclarator()
5432 } else if (Tok.is(tok::l_square)) { in ParseDirectDeclarator()
5454 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseParenDeclarator()
5471 if (Tok.is(tok::kw___attribute)) { in ParseParenDeclarator()
5483 if (Tok.is(tok::kw___pascal)) in ParseParenDeclarator()
5496 } else if (Tok.is(tok::r_paren) || // 'int()' is a function. in ParseParenDeclarator()
5497 (getLangOpts().CPlusPlus && Tok.is(tok::ellipsis) && in ParseParenDeclarator()
5498 NextToken().is(tok::r_paren)) || // C++ int(...) in ParseParenDeclarator()
5621 if (Tok.isNot(tok::r_paren)) in ParseFunctionDeclarator()
5681 GetLookAheadToken(0).is(tok::kw_noexcept) && in ParseFunctionDeclarator()
5682 GetLookAheadToken(1).is(tok::l_paren) && in ParseFunctionDeclarator()
5683 GetLookAheadToken(2).is(tok::kw_noexcept) && in ParseFunctionDeclarator()
5684 GetLookAheadToken(3).is(tok::l_paren) && in ParseFunctionDeclarator()
5685 GetLookAheadToken(4).is(tok::identifier) && in ParseFunctionDeclarator()
5712 if (getLangOpts().CPlusPlus11 && Tok.is(tok::arrow)) { in ParseFunctionDeclarator()
5752 if (Tok.isOneOf(tok::amp, tok::ampamp)) { in ParseRefQualifier()
5757 RefQualifierIsLValueRef = Tok.is(tok::amp); in ParseRefQualifier()
5771 && Tok.is(tok::identifier) in isFunctionDeclaratorIdentifierList()
5775 && (TryAnnotateTypeOrScopeToken() || !Tok.is(tok::annot_typename)) in isFunctionDeclaratorIdentifierList()
5788 && (NextToken().is(tok::comma) || NextToken().is(tok::r_paren)); in isFunctionDeclaratorIdentifierList()
5815 if (Tok.isNot(tok::identifier)) { in ParseFunctionDeclaratorIdentifierList()
5816 Diag(Tok, diag::err_expected) << tok::identifier; in ParseFunctionDeclaratorIdentifierList()
5817 SkipUntil(tok::r_paren, StopAtSemi | StopBeforeMatch); in ParseFunctionDeclaratorIdentifierList()
5842 } while (TryConsumeToken(tok::comma)); in ParseFunctionDeclaratorIdentifierList()
5884 if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) in ParseParameterDeclarationClause()
5940 if (Tok.is(tok::ellipsis) && in ParseParameterDeclarationClause()
5941 (NextToken().isNot(tok::r_paren) || in ParseParameterDeclarationClause()
5954 if (Tok.is(tok::equal)) { in ParseParameterDeclarationClause()
5985 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseParameterDeclarationClause()
5993 SkipUntil(tok::comma, tok::r_paren, StopAtSemi | StopBeforeMatch); in ParseParameterDeclarationClause()
6007 if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) { in ParseParameterDeclarationClause()
6039 } while (TryConsumeToken(tok::comma)); in ParseParameterDeclarationClause()
6053 BalancedDelimiterTracker T(*this, tok::l_square); in ParseBracketDeclarator()
6058 if (Tok.getKind() == tok::r_square) { in ParseBracketDeclarator()
6069 } else if (Tok.getKind() == tok::numeric_constant && in ParseBracketDeclarator()
6070 GetLookAheadToken(1).is(tok::r_square)) { in ParseBracketDeclarator()
6086 } else if (Tok.getKind() == tok::code_completion) { in ParseBracketDeclarator()
6093 TryConsumeToken(tok::kw_static, StaticLoc); in ParseBracketDeclarator()
6103 TryConsumeToken(tok::kw_static, StaticLoc); in ParseBracketDeclarator()
6113 if (Tok.is(tok::star) && GetLookAheadToken(1).is(tok::r_square)) { in ParseBracketDeclarator()
6121 } else if (Tok.isNot(tok::r_square)) { in ParseBracketDeclarator()
6148 SkipUntil(tok::r_square, StopAtSemi); in ParseBracketDeclarator()
6168 assert(Tok.is(tok::l_square) && "Missing opening bracket"); in ParseMisplacedBracketDeclarator()
6174 while (Tok.is(tok::l_square)) { in ParseMisplacedBracketDeclarator()
6181 if (Tok.is(tok::semi)) in ParseMisplacedBracketDeclarator()
6263 assert(Tok.is(tok::kw_typeof) && "Not a typeof specifier"); in ParseTypeofSpecifier()
6267 const bool hasParens = Tok.is(tok::l_paren); in ParseTypeofSpecifier()
6328 assert(Tok.is(tok::kw__Atomic) && NextToken().is(tok::l_paren) && in ParseAtomicSpecifier()
6332 BalancedDelimiterTracker T(*this, tok::l_paren); in ParseAtomicSpecifier()
6338 SkipUntil(tok::r_paren, StopAtSemi); in ParseAtomicSpecifier()
6365 case tok::kw_short: in TryAltiVecVectorTokenOutOfLine()
6366 case tok::kw_long: in TryAltiVecVectorTokenOutOfLine()
6367 case tok::kw_signed: in TryAltiVecVectorTokenOutOfLine()
6368 case tok::kw_unsigned: in TryAltiVecVectorTokenOutOfLine()
6369 case tok::kw_void: in TryAltiVecVectorTokenOutOfLine()
6370 case tok::kw_char: in TryAltiVecVectorTokenOutOfLine()
6371 case tok::kw_int: in TryAltiVecVectorTokenOutOfLine()
6372 case tok::kw_float: in TryAltiVecVectorTokenOutOfLine()
6373 case tok::kw_double: in TryAltiVecVectorTokenOutOfLine()
6374 case tok::kw_bool: in TryAltiVecVectorTokenOutOfLine()
6375 case tok::kw___bool: in TryAltiVecVectorTokenOutOfLine()
6376 case tok::kw___pixel: in TryAltiVecVectorTokenOutOfLine()
6377 Tok.setKind(tok::kw___vector); in TryAltiVecVectorTokenOutOfLine()
6379 case tok::identifier: in TryAltiVecVectorTokenOutOfLine()
6381 Tok.setKind(tok::kw___vector); in TryAltiVecVectorTokenOutOfLine()
6385 Tok.setKind(tok::kw___vector); in TryAltiVecVectorTokenOutOfLine()
6399 case tok::kw_short: in TryAltiVecTokenOutOfLine()
6400 case tok::kw_long: in TryAltiVecTokenOutOfLine()
6401 case tok::kw_signed: in TryAltiVecTokenOutOfLine()
6402 case tok::kw_unsigned: in TryAltiVecTokenOutOfLine()
6403 case tok::kw_void: in TryAltiVecTokenOutOfLine()
6404 case tok::kw_char: in TryAltiVecTokenOutOfLine()
6405 case tok::kw_int: in TryAltiVecTokenOutOfLine()
6406 case tok::kw_float: in TryAltiVecTokenOutOfLine()
6407 case tok::kw_double: in TryAltiVecTokenOutOfLine()
6408 case tok::kw_bool: in TryAltiVecTokenOutOfLine()
6409 case tok::kw___bool: in TryAltiVecTokenOutOfLine()
6410 case tok::kw___pixel: in TryAltiVecTokenOutOfLine()
6413 case tok::identifier: in TryAltiVecTokenOutOfLine()