Lines Matching refs:DS
52 DeclSpec DS(AttrFactory); in ParseTypeName() local
54 DS.addAttributes(*Attrs); in ParseTypeName()
55 ParseSpecifierQualifierList(DS, AS, DSC); in ParseTypeName()
57 *OwnedType = DS.isTypeSpecOwned() ? DS.getRepAsDecl() : nullptr; in ParseTypeName()
60 Declarator DeclaratorInfo(DS, ParsedAttributesView::none(), Context); in ParseTypeName()
1725 DeclSpec &DS, in stripTypeAttributesOffDeclSpec() argument
1732 for (ParsedAttr &AL : DS.getAttributes()) { in stripTypeAttributesOffDeclSpec()
1740 DS.getAttributes().remove(AL); in stripTypeAttributesOffDeclSpec()
1847 ParsingDeclSpec DS(*this); in ParseSimpleDeclaration() local
1848 DS.takeAttributesFrom(DeclSpecAttrs); in ParseSimpleDeclaration()
1851 ParseDeclarationSpecifiers(DS, ParsedTemplateInfo(), AS_none, DSContext); in ParseSimpleDeclaration()
1855 if (DS.hasTagDefinition() && in ParseSimpleDeclaration()
1856 DiagnoseMissingSemiAfterTagDefinition(DS, AS_none, DSContext)) in ParseSimpleDeclaration()
1867 getCurScope(), AS_none, DS, ParsedAttributesView::none(), AnonRecord); in ParseSimpleDeclaration()
1868 DS.complete(TheDecl); in ParseSimpleDeclaration()
1877 DS.SetRangeStart(*DeclSpecStart); in ParseSimpleDeclaration()
1879 return ParseDeclGroup(DS, Context, DeclAttrs, &DeclEnd, FRI); in ParseSimpleDeclaration()
2032 Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, in ParseDeclGroup() argument
2043 ParsingDeclarator D(*this, DS, LocalAttrs, Context); in ParseDeclGroup()
2072 bool Fixit = !DS.setFunctionSpecNoreturn(Loc, PrevSpec, DiagID); in ParseDeclGroup()
2112 if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef) { in ParseDeclGroup()
2116 DS.ClearStorageClassSpecs(); in ParseDeclGroup()
2177 return Actions.FinalizeDeclaratorGroup(getCurScope(), DS, ThisDecl); in ParseDeclGroup()
2253 return Actions.FinalizeDeclaratorGroup(getCurScope(), DS, DeclsInGroup); in ParseDeclGroup()
2566 void Parser::ParseSpecifierQualifierList(DeclSpec &DS, AccessSpecifier AS, in ParseSpecifierQualifierList() argument
2571 ParseDeclarationSpecifiers(DS, ParsedTemplateInfo(), AS, DSC); in ParseSpecifierQualifierList()
2574 unsigned Specs = DS.getParsedSpecifiers(); in ParseSpecifierQualifierList()
2575 if (isTypeSpecifier(DSC) && !DS.hasTypeSpecifier()) { in ParseSpecifierQualifierList()
2577 DS.SetTypeSpecError(); in ParseSpecifierQualifierList()
2578 } else if (Specs == DeclSpec::PQ_None && !DS.hasAttributes()) { in ParseSpecifierQualifierList()
2580 if (!DS.hasTypeSpecifier()) in ParseSpecifierQualifierList()
2581 DS.SetTypeSpecError(); in ParseSpecifierQualifierList()
2586 if (DS.getStorageClassSpecLoc().isValid()) in ParseSpecifierQualifierList()
2587 Diag(DS.getStorageClassSpecLoc(),diag::err_typename_invalid_storageclass); in ParseSpecifierQualifierList()
2589 Diag(DS.getThreadStorageClassSpecLoc(), in ParseSpecifierQualifierList()
2591 DS.ClearStorageClassSpecs(); in ParseSpecifierQualifierList()
2596 if (DS.isInlineSpecified()) in ParseSpecifierQualifierList()
2597 Diag(DS.getInlineSpecLoc(), diag::err_typename_invalid_functionspec); in ParseSpecifierQualifierList()
2598 if (DS.isVirtualSpecified()) in ParseSpecifierQualifierList()
2599 Diag(DS.getVirtualSpecLoc(), diag::err_typename_invalid_functionspec); in ParseSpecifierQualifierList()
2600 if (DS.hasExplicitSpecifier()) in ParseSpecifierQualifierList()
2601 Diag(DS.getExplicitSpecLoc(), diag::err_typename_invalid_functionspec); in ParseSpecifierQualifierList()
2602 DS.ClearFunctionSpecs(); in ParseSpecifierQualifierList()
2606 if (DS.hasConstexprSpecifier() && DSC != DeclSpecContext::DSC_condition) { in ParseSpecifierQualifierList()
2607 Diag(DS.getConstexprSpecLoc(), diag::err_typename_invalid_constexpr) in ParseSpecifierQualifierList()
2608 << static_cast<int>(DS.getConstexprSpecifier()); in ParseSpecifierQualifierList()
2609 DS.ClearConstexprSpec(); in ParseSpecifierQualifierList()
2646 bool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS, in ParseImplicitInt() argument
2665 assert(!DS.hasTypeSpecifier() && "Type specifier checked above"); in ParseImplicitInt()
2682 if (getLangOpts().OpenCLCPlusPlus && DS.isTypeSpecPipe()) in ParseImplicitInt()
2686 DS.getStorageClassSpec() == DeclSpec::SCS_auto) { in ParseImplicitInt()
2704 DS.SetTypeSpecType(DeclSpec::TST_typename, Loc, PrevSpec, DiagID, T, in ParseImplicitInt()
2706 DS.SetRangeEnd(Tok.getLocation()); in ParseImplicitInt()
2755 ParseEnumSpecifier(Loc, DS, TemplateInfo, AS, in ParseImplicitInt()
2758 ParseClassSpecifier(TagKind, Loc, DS, TemplateInfo, AS, in ParseImplicitInt()
2841 DS.SetTypeSpecType(DeclSpec::TST_typename, Loc, PrevSpec, DiagID, T, in ParseImplicitInt()
2843 DS.SetRangeEnd(Tok.getLocation()); in ParseImplicitInt()
2855 DS.SetTypeSpecError(); in ParseImplicitInt()
2856 DS.SetRangeEnd(Tok.getLocation()); in ParseImplicitInt()
2991 Parser::DiagnoseMissingSemiAfterTagDefinition(DeclSpec &DS, AccessSpecifier AS, in DiagnoseMissingSemiAfterTagDefinition() argument
2994 assert(DS.hasTagDefinition() && "shouldn't call this"); in DiagnoseMissingSemiAfterTagDefinition()
3077 Diag(PP.getLocForEndOfToken(DS.getRepAsDecl()->getEndLoc()), in DiagnoseMissingSemiAfterTagDefinition()
3079 << DeclSpec::getSpecifierName(DS.getTypeSpecType(), PPol) << tok::semi; in DiagnoseMissingSemiAfterTagDefinition()
3088 DS.ClearTypeSpecType(); in DiagnoseMissingSemiAfterTagDefinition()
3090 ParseDeclarationSpecifiers(DS, NotATemplate, AS, DSContext, LateAttrs); in DiagnoseMissingSemiAfterTagDefinition()
3132 void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, in ParseDeclarationSpecifiers() argument
3137 if (DS.getSourceRange().isInvalid()) { in ParseDeclarationSpecifiers()
3141 DS.SetRangeStart(Tok.getLocation()); in ParseDeclarationSpecifiers()
3142 DS.SetRangeEnd(SourceLocation()); in ParseDeclarationSpecifiers()
3169 DS.getStorageClassSpec() == clang::DeclSpec::SCS_typedef && in ParseDeclarationSpecifiers()
3170 !DS.hasTypeSpecifier() && GetLookAheadToken(1).is(tok::less)) in ParseDeclarationSpecifiers()
3184 isInvalid = DS.SetTypeSpecType(ImageTypeSpec, Loc, PrevSpec, DiagID, Policy); in ParseDeclarationSpecifiers()
3225 DS.takeAttributesFrom(attrs); in ParseDeclarationSpecifiers()
3230 DS.Finish(Actions, Policy); in ParseDeclarationSpecifiers()
3251 if (DS.hasTypeSpecifier()) { in ParseDeclarationSpecifiers()
3260 (DSContext == DeclSpecContext::DSC_class && DS.isFriendSpecified()); in ParseDeclarationSpecifiers()
3263 Actions.CodeCompleteDeclSpec(getCurScope(), DS, in ParseDeclarationSpecifiers()
3287 if (!DS.hasTypeSpecifier()) in ParseDeclarationSpecifiers()
3288 DS.SetTypeSpecError(); in ParseDeclarationSpecifiers()
3296 if (DS.hasTypeSpecifier() || DS.isTypeAltiVecVector()) in ParseDeclarationSpecifiers()
3313 DS.SetTypeSpecError(); in ParseDeclarationSpecifiers()
3340 DS.getTypeSpecScope() = SS; in ParseDeclarationSpecifiers()
3350 DS.getTypeSpecScope() = SS; in ParseDeclarationSpecifiers()
3359 DS.getTypeSpecScope() = SS; in ParseDeclarationSpecifiers()
3362 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typename, in ParseDeclarationSpecifiers()
3367 DS.SetRangeEnd(Tok.getAnnotationEndLoc()); in ParseDeclarationSpecifiers()
3413 if (ParseImplicitInt(DS, &SS, TemplateInfo, AS, DSContext, Attrs)) { in ParseDeclarationSpecifiers()
3423 DS.getTypeSpecScope() = SS; in ParseDeclarationSpecifiers()
3426 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typename, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3431 DS.SetRangeEnd(Tok.getLocation()); in ParseDeclarationSpecifiers()
3440 if (DS.hasTypeSpecifier() && DS.hasTagDefinition()) in ParseDeclarationSpecifiers()
3444 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typename, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3449 DS.SetRangeEnd(Tok.getAnnotationEndLoc()); in ParseDeclarationSpecifiers()
3463 if (DS.getTypeSpecType() == TST_bool && in ParseDeclarationSpecifiers()
3464 DS.getTypeQualifiers() == DeclSpec::TQ_const && in ParseDeclarationSpecifiers()
3465 DS.getStorageClassSpec() == DeclSpec::SCS_static) in ParseDeclarationSpecifiers()
3478 if (DS.hasTypeSpecifier()) in ParseDeclarationSpecifiers()
3523 DS.SetTypeSpecError(); in ParseDeclarationSpecifiers()
3532 if (TryAltiVecToken(DS, Loc, PrevSpec, DiagID, isInvalid)) in ParseDeclarationSpecifiers()
3537 if (DS.isTypeAltiVecVector()) in ParseDeclarationSpecifiers()
3544 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typename, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3549 DS.SetRangeEnd(Loc); in ParseDeclarationSpecifiers()
3574 if (ParseImplicitInt(DS, nullptr, TemplateInfo, AS, DSContext, Attrs)) { in ParseDeclarationSpecifiers()
3595 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typename, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3600 DS.SetRangeEnd(Tok.getLocation()); in ParseDeclarationSpecifiers()
3612 DS.UpdateTypeRep(NewTypeRep.get()); in ParseDeclarationSpecifiers()
3613 DS.SetRangeEnd(NewEndLoc); in ParseDeclarationSpecifiers()
3627 DS.SetTypeSpecError(); in ParseDeclarationSpecifiers()
3641 isInvalid = DS.SetTypeSpecType(TST_auto, Loc, PrevSpec, DiagID, in ParseDeclarationSpecifiers()
3667 DS.setTypeofParensRange(Tracker.getRange()); in ParseDeclarationSpecifiers()
3670 isInvalid = DS.SetTypeSpecType(TST_decltype_auto, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3673 isInvalid = DS.SetTypeSpecType(TST_auto, AutoLoc, PrevSpec, DiagID, in ParseDeclarationSpecifiers()
3704 ParseAttributes(PAKM_GNU | PAKM_Declspec, DS.getAttributes(), LateAttrs); in ParseDeclarationSpecifiers()
3709 isInvalid = DS.setFunctionSpecForceInline(Loc, PrevSpec, DiagID); in ParseDeclarationSpecifiers()
3712 DS.getAttributes().addNew(AttrName, AttrNameLoc, nullptr, AttrNameLoc, in ParseDeclarationSpecifiers()
3718 isInvalid = DS.SetTypeQual(DeclSpec::TQ_unaligned, Loc, PrevSpec, DiagID, in ParseDeclarationSpecifiers()
3733 ParseMicrosoftTypeAttributes(DS.getAttributes()); in ParseDeclarationSpecifiers()
3738 ParseBorlandTypeAttributes(DS.getAttributes()); in ParseDeclarationSpecifiers()
3743 ParseOpenCLKernelAttributes(DS.getAttributes()); in ParseDeclarationSpecifiers()
3748 ParseCUDAFunctionAttributes(DS.getAttributes()); in ParseDeclarationSpecifiers()
3756 ParseNullabilityTypeSpecifiers(DS.getAttributes()); in ParseDeclarationSpecifiers()
3761 DS.getAttributes().addNew(Tok.getIdentifierInfo(), Loc, nullptr, Loc, in ParseDeclarationSpecifiers()
3768 isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_typedef, Loc, in ParseDeclarationSpecifiers()
3773 if (DS.getThreadStorageClassSpec() == DeclSpec::TSCS___thread) in ParseDeclarationSpecifiers()
3775 isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_extern, Loc, in ParseDeclarationSpecifiers()
3780 isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_private_extern, in ParseDeclarationSpecifiers()
3785 if (DS.getThreadStorageClassSpec() == DeclSpec::TSCS___thread) in ParseDeclarationSpecifiers()
3787 isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_static, Loc, in ParseDeclarationSpecifiers()
3794 isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_auto, Loc, in ParseDeclarationSpecifiers()
3798 << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc()); in ParseDeclarationSpecifiers()
3800 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_auto, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3803 isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_auto, Loc, in ParseDeclarationSpecifiers()
3809 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_auto_type, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3813 isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_register, Loc, in ParseDeclarationSpecifiers()
3818 isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_mutable, Loc, in ParseDeclarationSpecifiers()
3823 isInvalid = DS.SetStorageClassSpecThread(DeclSpec::TSCS___thread, Loc, in ParseDeclarationSpecifiers()
3828 isInvalid = DS.SetStorageClassSpecThread(DeclSpec::TSCS_thread_local, Loc, in ParseDeclarationSpecifiers()
3835 isInvalid = DS.SetStorageClassSpecThread(DeclSpec::TSCS__Thread_local, in ParseDeclarationSpecifiers()
3842 isInvalid = DS.setFunctionSpecInline(Loc, PrevSpec, DiagID); in ParseDeclarationSpecifiers()
3854 isInvalid = DS.setFunctionSpecVirtual(Loc, PrevSpec, DiagID); in ParseDeclarationSpecifiers()
3885 isInvalid = DS.setFunctionSpecExplicit(ExplicitLoc, PrevSpec, DiagID, in ParseDeclarationSpecifiers()
3892 isInvalid = DS.setFunctionSpecNoreturn(Loc, PrevSpec, DiagID); in ParseDeclarationSpecifiers()
3899 ParseAlignmentSpecifier(DS.getAttributes()); in ParseDeclarationSpecifiers()
3905 isInvalid = DS.SetFriendSpec(Loc, PrevSpec, DiagID); in ParseDeclarationSpecifiers()
3915 isInvalid = DS.setModulePrivateSpec(Loc, PrevSpec, DiagID); in ParseDeclarationSpecifiers()
3920 isInvalid = DS.SetConstexprSpec(ConstexprSpecKind::Constexpr, Loc, in ParseDeclarationSpecifiers()
3924 isInvalid = DS.SetConstexprSpec(ConstexprSpecKind::Consteval, Loc, in ParseDeclarationSpecifiers()
3928 isInvalid = DS.SetConstexprSpec(ConstexprSpecKind::Constinit, Loc, in ParseDeclarationSpecifiers()
3934 isInvalid = DS.SetTypeSpecWidth(TypeSpecifierWidth::Short, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3938 if (DS.getTypeSpecWidth() != TypeSpecifierWidth::Long) in ParseDeclarationSpecifiers()
3939 isInvalid = DS.SetTypeSpecWidth(TypeSpecifierWidth::Long, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3942 isInvalid = DS.SetTypeSpecWidth(TypeSpecifierWidth::LongLong, Loc, in ParseDeclarationSpecifiers()
3946 isInvalid = DS.SetTypeSpecWidth(TypeSpecifierWidth::LongLong, Loc, in ParseDeclarationSpecifiers()
3951 DS.SetTypeSpecSign(TypeSpecifierSign::Signed, Loc, PrevSpec, DiagID); in ParseDeclarationSpecifiers()
3954 isInvalid = DS.SetTypeSpecSign(TypeSpecifierSign::Unsigned, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3960 isInvalid = DS.SetTypeSpecComplex(DeclSpec::TSC_complex, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3966 isInvalid = DS.SetTypeSpecComplex(DeclSpec::TSC_imaginary, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3970 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_void, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3974 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_char, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3978 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_int, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3987 isInvalid = DS.SetBitIntType(Loc, ER.get(), PrevSpec, DiagID, Policy); in ParseDeclarationSpecifiers()
3992 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_int128, Loc, PrevSpec, in ParseDeclarationSpecifiers()
3996 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_half, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4000 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_BFloat16, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4004 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_float, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4008 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_double, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4012 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_float16, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4019 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_accum, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4027 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_fract, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4035 isInvalid = DS.SetTypeSpecSat(Loc, PrevSpec, DiagID); in ParseDeclarationSpecifiers()
4039 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_float128, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4043 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_ibm128, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4047 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_wchar, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4051 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_char8, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4055 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_char16, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4059 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_char32, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4068 DS.getTypeSpecType() != DeclSpec::TST_unspecified && in ParseDeclarationSpecifiers()
4069 DS.getStorageClassSpec() == DeclSpec::SCS_typedef) { in ParseDeclarationSpecifiers()
4076 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_bool, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4081 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_decimal32, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4085 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_decimal64, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4089 isInvalid = DS.SetTypeSpecType(DeclSpec::TST_decimal128, Loc, PrevSpec, in ParseDeclarationSpecifiers()
4093 isInvalid = DS.SetTypeAltiVecVector(true, Loc, PrevSpec, DiagID, Policy); in ParseDeclarationSpecifiers()
4096 isInvalid = DS.SetTypeAltiVecPixel(true, Loc, PrevSpec, DiagID, Policy); in ParseDeclarationSpecifiers()
4099 isInvalid = DS.SetTypeAltiVecBool(true, Loc, PrevSpec, DiagID, Policy); in ParseDeclarationSpecifiers()
4114 isInvalid = DS.SetTypePipe(true, Loc, PrevSpec, DiagID, Policy); in ParseDeclarationSpecifiers()
4126 isInvalid = DS.SetTypeSpecType(TST_unknown_anytype, Loc, in ParseDeclarationSpecifiers()
4142 ParseClassSpecifier(Kind, Loc, DS, TemplateInfo, AS, in ParseDeclarationSpecifiers()
4157 ParseEnumSpecifier(Loc, DS, TemplateInfo, AS, DSContext); in ParseDeclarationSpecifiers()
4162 isInvalid = DS.SetTypeQual(DeclSpec::TQ_const, Loc, PrevSpec, DiagID, in ParseDeclarationSpecifiers()
4166 isInvalid = DS.SetTypeQual(DeclSpec::TQ_volatile, Loc, PrevSpec, DiagID, in ParseDeclarationSpecifiers()
4170 isInvalid = DS.SetTypeQual(DeclSpec::TQ_restrict, Loc, PrevSpec, DiagID, in ParseDeclarationSpecifiers()
4177 DS.SetTypeSpecError(); in ParseDeclarationSpecifiers()
4186 ParseTypeofSpecifier(DS); in ParseDeclarationSpecifiers()
4190 ParseDecltypeSpecifier(DS); in ParseDeclarationSpecifiers()
4210 ParseUnderlyingTypeSpecifier(DS); in ParseDeclarationSpecifiers()
4222 ParseAtomicSpecifier(DS); in ParseDeclarationSpecifiers()
4225 isInvalid = DS.SetTypeQual(DeclSpec::TQ_atomic, Loc, PrevSpec, DiagID, in ParseDeclarationSpecifiers()
4256 ParseOpenCLQualifiers(DS.getAttributes()); in ParseDeclarationSpecifiers()
4263 if (DS.hasTypeSpecifier() || !getLangOpts().ObjC) in ParseDeclarationSpecifiers()
4270 if (DS.SetTypeSpecType(DeclSpec::TST_typename, StartLoc, StartLoc, in ParseDeclarationSpecifiers()
4275 DS.SetRangeEnd(EndLoc); in ParseDeclarationSpecifiers()
4277 DS.SetTypeSpecError(); in ParseDeclarationSpecifiers()
4285 DS.SetRangeEnd(ConsumedEnd.isValid() ? ConsumedEnd : Tok.getLocation()); in ParseDeclarationSpecifiers()
4297 SourceRange(Loc, DS.getEndLoc())); in ParseDeclarationSpecifiers()
4335 ParsingDeclSpec &DS, in ParseStructDeclaration() argument
4342 return ParseStructDeclaration(DS, FieldsCallback); in ParseStructDeclaration()
4350 ParseSpecifierQualifierList(DS); in ParseStructDeclaration()
4362 getCurScope(), AS_none, DS, ParsedAttributesView::none(), AnonRecord); in ParseStructDeclaration()
4364 DS.complete(TheDecl); in ParseStructDeclaration()
4372 ParsingFieldDeclarator DeclaratorInfo(*this, DS, Attrs); in ParseStructDeclaration()
4494 ParsingDeclSpec DS(*this); in ParseStructUnionBody() local
4495 ParseStructDeclaration(DS, CFieldCallback); in ParseStructUnionBody()
4576 void Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, in ParseEnumSpecifier() argument
4624 DS.isEmpty() && isOpaqueEnumDeclarationContext(DSC); in ParseEnumSpecifier()
4630 CXXScopeSpec &SS = DS.getTypeSpecScope(); in ParseEnumSpecifier()
4729 DeclSpec DS(AttrFactory); in ParseEnumSpecifier() local
4730 ParseSpecifierQualifierList(DS, AS, DeclSpecContext::DSC_type_specifier); in ParseEnumSpecifier()
4731 Declarator DeclaratorInfo(DS, ParsedAttributesView::none(), in ParseEnumSpecifier()
4768 if (DS.isFriendSpecified()) { in ParseEnumSpecifier()
4770 << SourceRange(DS.getFriendSpecLoc()); in ParseEnumSpecifier()
4789 TUK = DS.isFriendSpecified() ? Sema::TUK_Friend : Sema::TUK_Declaration; in ParseEnumSpecifier()
4821 DS.SetTypeSpecError(); in ParseEnumSpecifier()
4859 stripTypeAttributesOffDeclSpec(attrs, DS, TUK); in ParseEnumSpecifier()
4874 attrs, AS, DS.getModulePrivateSpecLoc(), TParams, Owned, IsDependent, in ParseEnumSpecifier()
4888 if (DS.SetTypeSpecType(DeclSpec::TST_enum, StartLoc, in ParseEnumSpecifier()
4900 DS.SetTypeSpecError(); in ParseEnumSpecifier()
4908 DS.SetTypeSpecError(); in ParseEnumSpecifier()
4912 if (DS.SetTypeSpecType(DeclSpec::TST_typename, StartLoc, in ParseEnumSpecifier()
4929 DS.SetTypeSpecError(); in ParseEnumSpecifier()
4938 DS.SetTypeSpecError(); in ParseEnumSpecifier()
4943 if (DS.SetTypeSpecType(DeclSpec::TST_enum, StartLoc, in ParseEnumSpecifier()
5668 DeclSpec &DS, unsigned AttrReqs, bool AtomicAllowed, in ParseTypeQualifierListOpt() argument
5675 DS.takeAttributesFrom(Attrs); in ParseTypeQualifierListOpt()
5692 Actions.CodeCompleteTypeQualifiers(DS); in ParseTypeQualifierListOpt()
5696 isInvalid = DS.SetTypeQual(DeclSpec::TQ_const , Loc, PrevSpec, DiagID, in ParseTypeQualifierListOpt()
5700 isInvalid = DS.SetTypeQual(DeclSpec::TQ_volatile, Loc, PrevSpec, DiagID, in ParseTypeQualifierListOpt()
5704 isInvalid = DS.SetTypeQual(DeclSpec::TQ_restrict, Loc, PrevSpec, DiagID, in ParseTypeQualifierListOpt()
5712 isInvalid = DS.SetTypeQual(DeclSpec::TQ_atomic, Loc, PrevSpec, DiagID, in ParseTypeQualifierListOpt()
5729 ParseOpenCLQualifiers(DS.getAttributes()); in ParseTypeQualifierListOpt()
5733 isInvalid = DS.SetTypeQual(DeclSpec::TQ_unaligned, Loc, PrevSpec, DiagID, in ParseTypeQualifierListOpt()
5740 IdentifierRequired && DS.isEmpty() && NextToken().is(tok::semi)) { in ParseTypeQualifierListOpt()
5756 ParseMicrosoftTypeAttributes(DS.getAttributes()); in ParseTypeQualifierListOpt()
5762 ParseBorlandTypeAttributes(DS.getAttributes()); in ParseTypeQualifierListOpt()
5772 ParseNullabilityTypeSpecifiers(DS.getAttributes()); in ParseTypeQualifierListOpt()
5777 DS.getAttributes().addNew(Tok.getIdentifierInfo(), Loc, nullptr, Loc, in ParseTypeQualifierListOpt()
5791 ParseGNUAttributes(DS.getAttributes()); in ParseTypeQualifierListOpt()
5800 DS.Finish(Actions, Actions.getASTContext().getPrintingPolicy()); in ParseTypeQualifierListOpt()
5802 DS.SetRangeEnd(EndLoc); in ParseTypeQualifierListOpt()
5927 DeclSpec DS(AttrFactory); in ParseDeclaratorInternal() local
5928 ParseTypeQualifierListOpt(DS); in ParseDeclaratorInternal()
5929 D.ExtendWithDeclSpec(DS); in ParseDeclaratorInternal()
5939 SS, DS.getTypeQualifiers(), StarLoc, DS.getEndLoc()), in ParseDeclaratorInternal()
5940 std::move(DS.getAttributes()), in ParseDeclaratorInternal()
5949 DeclSpec DS(AttrFactory); in ParseDeclaratorInternal() local
5950 ParseTypeQualifierListOpt(DS); in ParseDeclaratorInternal()
5953 DeclaratorChunk::getPipe(DS.getTypeQualifiers(), DS.getPipeLoc()), in ParseDeclaratorInternal()
5954 std::move(DS.getAttributes()), SourceLocation()); in ParseDeclaratorInternal()
5971 DeclSpec DS(AttrFactory); in ParseDeclaratorInternal() local
5979 ParseTypeQualifierListOpt(DS, Reqs, true, !D.mayOmitIdentifier()); in ParseDeclaratorInternal()
5980 D.ExtendWithDeclSpec(DS); in ParseDeclaratorInternal()
5988 DS.getTypeQualifiers(), Loc, DS.getConstSpecLoc(), in ParseDeclaratorInternal()
5989 DS.getVolatileSpecLoc(), DS.getRestrictSpecLoc(), in ParseDeclaratorInternal()
5990 DS.getAtomicSpecLoc(), DS.getUnalignedSpecLoc()), in ParseDeclaratorInternal()
5991 std::move(DS.getAttributes()), SourceLocation()); in ParseDeclaratorInternal()
5995 DeclaratorChunk::getBlockPointer(DS.getTypeQualifiers(), Loc), in ParseDeclaratorInternal()
5996 std::move(DS.getAttributes()), SourceLocation()); in ParseDeclaratorInternal()
5999 DeclSpec DS(AttrFactory); in ParseDeclaratorInternal() local
6009 ParseTypeQualifierListOpt(DS); in ParseDeclaratorInternal()
6010 D.ExtendWithDeclSpec(DS); in ParseDeclaratorInternal()
6015 if (DS.getTypeQualifiers() != DeclSpec::TQ_unspecified) { in ParseDeclaratorInternal()
6016 if (DS.getTypeQualifiers() & DeclSpec::TQ_const) in ParseDeclaratorInternal()
6017 Diag(DS.getConstSpecLoc(), in ParseDeclaratorInternal()
6019 if (DS.getTypeQualifiers() & DeclSpec::TQ_volatile) in ParseDeclaratorInternal()
6020 Diag(DS.getVolatileSpecLoc(), in ParseDeclaratorInternal()
6023 if (DS.getTypeQualifiers() & DeclSpec::TQ_atomic) in ParseDeclaratorInternal()
6024 Diag(DS.getAtomicSpecLoc(), in ParseDeclaratorInternal()
6050 D.AddTypeInfo(DeclaratorChunk::getReference(DS.getTypeQualifiers(), Loc, in ParseDeclaratorInternal()
6052 std::move(DS.getAttributes()), SourceLocation()); in ParseDeclaratorInternal()
6613 const Declarator &D, const DeclSpec &DS, in InitCXXThisScopeForDeclaratorIfRelevant() argument
6633 Qualifiers Q = Qualifiers::fromCVRUMask(DS.getTypeQualifiers()); in InitCXXThisScopeForDeclaratorIfRelevant()
6642 for (ParsedAttr &attr : DS.getAttributes()) { in InitCXXThisScopeForDeclaratorIfRelevant()
6692 DeclSpec DS(AttrFactory); in ParseFunctionDeclarator() local
6753 ParseTypeQualifierListOpt(DS, AR_NoAttributesParsed, in ParseFunctionDeclarator()
6757 Actions.CodeCompleteFunctionQualifiers(DS, D); in ParseFunctionDeclarator()
6759 if (!DS.getSourceRange().getEnd().isInvalid()) { in ParseFunctionDeclarator()
6760 EndLoc = DS.getSourceRange().getEnd(); in ParseFunctionDeclarator()
6768 InitCXXThisScopeForDeclaratorIfRelevant(D, DS, ThisScope); in ParseFunctionDeclarator()
6850 &DS), in ParseFunctionDeclarator()
7012 DeclSpec DS(AttrFactory); in ParseParameterDeclarationClause() local
7033 ParseDeclarationSpecifiers(DS); in ParseParameterDeclarationClause()
7034 DS.takeAttributesFrom(ArgDeclSpecAttrs); in ParseParameterDeclarationClause()
7039 Declarator ParmDeclarator(DS, ArgDeclAttrs, in ParseParameterDeclarationClause()
7049 MaybeParseHLSLSemantics(DS.getAttributes()); in ParseParameterDeclarationClause()
7071 if (DS.isEmpty() && ParmDeclarator.getIdentifier() == nullptr && in ParseParameterDeclarationClause()
7270 DeclSpec DS(AttrFactory); in ParseBracketDeclarator() local
7271 ParseTypeQualifierListOpt(DS, AR_CXX11AttributesParsed); in ParseBracketDeclarator()
7327 MaybeParseCXX11Attributes(DS.getAttributes()); in ParseBracketDeclarator()
7331 DeclaratorChunk::getArray(DS.getTypeQualifiers(), StaticLoc.isValid(), in ParseBracketDeclarator()
7334 std::move(DS.getAttributes()), T.getCloseLocation()); in ParseBracketDeclarator()
7431 void Parser::ParseTypeofSpecifier(DeclSpec &DS) { in ParseTypeofSpecifier() argument
7448 DS.setTypeofParensRange(CastRange); in ParseTypeofSpecifier()
7452 DS.SetRangeEnd(Tok.getLocation()); in ParseTypeofSpecifier()
7454 DS.SetRangeEnd(CastRange.getEnd()); in ParseTypeofSpecifier()
7458 DS.SetTypeSpecError(); in ParseTypeofSpecifier()
7465 if (DS.SetTypeSpecType(DeclSpec::TST_typeofType, StartLoc, PrevSpec, in ParseTypeofSpecifier()
7474 DS.SetTypeSpecError(); in ParseTypeofSpecifier()
7481 DS.SetTypeSpecError(); in ParseTypeofSpecifier()
7488 if (DS.SetTypeSpecType(DeclSpec::TST_typeofExpr, StartLoc, PrevSpec, in ParseTypeofSpecifier()
7497 void Parser::ParseAtomicSpecifier(DeclSpec &DS) { in ParseAtomicSpecifier() argument
7518 DS.setTypeofParensRange(T.getRange()); in ParseAtomicSpecifier()
7519 DS.SetRangeEnd(T.getCloseLocation()); in ParseAtomicSpecifier()
7523 if (DS.SetTypeSpecType(DeclSpec::TST_atomic, StartLoc, PrevSpec, in ParseAtomicSpecifier()
7564 bool Parser::TryAltiVecTokenOutOfLine(DeclSpec &DS, SourceLocation Loc, in TryAltiVecTokenOutOfLine() argument
7584 isInvalid = DS.SetTypeAltiVecVector(true, Loc, PrevSpec, DiagID, Policy); in TryAltiVecTokenOutOfLine()
7588 isInvalid = DS.SetTypeAltiVecVector(true, Loc, PrevSpec, DiagID,Policy); in TryAltiVecTokenOutOfLine()
7594 DS.SetTypeAltiVecVector(true, Loc, PrevSpec, DiagID, Policy); in TryAltiVecTokenOutOfLine()
7602 DS.isTypeAltiVecVector()) { in TryAltiVecTokenOutOfLine()
7603 isInvalid = DS.SetTypeAltiVecPixel(true, Loc, PrevSpec, DiagID, Policy); in TryAltiVecTokenOutOfLine()
7606 DS.isTypeAltiVecVector()) { in TryAltiVecTokenOutOfLine()
7607 isInvalid = DS.SetTypeAltiVecBool(true, Loc, PrevSpec, DiagID, Policy); in TryAltiVecTokenOutOfLine()