Home | History | Annotate | Download | only in Sema

Lines Matching refs:DS

3445                                        DeclSpec &DS) {
3446 return ParsedFreeStandingDeclSpec(S, AS, DS, MultiTemplateParamsArg());
3532 DeclSpec &DS,
3537 if (DS.getTypeSpecType() == DeclSpec::TST_class ||
3538 DS.getTypeSpecType() == DeclSpec::TST_struct ||
3539 DS.getTypeSpecType() == DeclSpec::TST_interface ||
3540 DS.getTypeSpecType() == DeclSpec::TST_union ||
3541 DS.getTypeSpecType() == DeclSpec::TST_enum) {
3542 TagD = DS.getRepAsDecl();
3563 if (unsigned TypeQuals = DS.getTypeQualifiers()) {
3567 Diag(DS.getRestrictSpecLoc(),
3569 << DS.getSourceRange();
3572 if (DS.isConstexprSpecified()) {
3576 Diag(DS.getConstexprSpecLoc(), diag::err_constexpr_tag)
3577 << (DS.getTypeSpecType() == DeclSpec::TST_class ? 0 :
3578 DS.getTypeSpecType() == DeclSpec::TST_struct ? 1 :
3579 DS.getTypeSpecType() == DeclSpec::TST_interface ? 2 :
3580 DS.getTypeSpecType() == DeclSpec::TST_union ? 3 : 4);
3582 Diag(DS.getConstexprSpecLoc(), diag::err_constexpr_no_declarators);
3587 DiagnoseFunctionSpecifiers(DS);
3589 if (DS.isFriendSpecified()) {
3594 return ActOnFriendTypeDecl(S, DS, TemplateParams);
3597 const CXXScopeSpec &SS = DS.getTypeSpecScope();
3607 << (DS.getTypeSpecType() == DeclSpec::TST_class ? 0 :
3608 DS.getTypeSpecType() == DeclSpec::TST_struct ? 1 :
3609 DS.getTypeSpecType() == DeclSpec::TST_interface ? 2 :
3610 DS.getTypeSpecType() == DeclSpec::TST_union ? 3 : 4)
3621 DS.getStorageClassSpec() != DeclSpec::SCS_typedef) {
3624 return BuildAnonymousStructOrUnion(S, DS, AS, Record,
3638 DS.getStorageClassSpec() == DeclSpec::SCS_unspecified) {
3647 DS.getTypeSpecType() == DeclSpec::TST_typename) {
3652 DS.getRepAsType().get()->getAsStructureType())
3654 else if (const RecordType *UT = DS.getRepAsType().get()->getAsUnionType())
3658 Diag(DS.getLocStart(), diag::ext_ms_anonymous_record)
3659 << Record->isUnion() << DS.getSourceRange();
3660 return BuildMicrosoftCAnonymousStruct(S, DS, Record);
3668 if (DS.getTypeSpecType() == DeclSpec::TST_error ||
3673 DS.getStorageClassSpec() != DeclSpec::SCS_typedef)
3679 if (!DS.isMissingDeclaratorOk()) {
3681 if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef)
3682 Diag(DS.getLocStart(), diag::ext_typedef_without_a_name)
3683 << DS.getSourceRange();
3688 if (DS.isModulePrivateSpecified() &&
3690 Diag(DS.getModulePrivateSpecLoc(), diag::err_module_private_local_class)
3692 << FixItHint::CreateRemoval(DS.getModulePrivateSpecLoc());
3707 Diag(DS.getLocStart(), diag::ext_no_declarators) << DS.getSourceRange();
3726 if (DeclSpec::SCS SCS = DS.getStorageClassSpec()) {
3730 Diag(DS.getStorageClassSpecLoc(), diag::err_mutable_nonmember);
3731 else if (!DS.isExternInLinkageSpec() && SCS != DeclSpec::SCS_typedef)
3732 Diag(DS.getStorageClassSpecLoc(), DiagID)
3736 if (DeclSpec::TSCS TSCS = DS.getThreadStorageClassSpec())
3737 Diag(DS.getThreadStorageClassSpecLoc(), DiagID)
3739 if (DS.getTypeQualifiers()) {
3740 if (DS.getTypeQualifiers() & DeclSpec::TQ_const)
3741 Diag(DS.getConstSpecLoc(), DiagID) << "const";
3742 if (DS.getTypeQualifiers() & DeclSpec::TQ_volatile)
3743 Diag(DS.getConstSpecLoc(), DiagID) << "volatile";
3745 if (DS.getTypeQualifiers() & DeclSpec::TQ_atomic)
3746 Diag(DS.getAtomicSpecLoc(), DiagID) << "_Atomic";
3752 if (!DS.getAttributes().empty()) {
3753 DeclSpec::TST TypeSpecType = DS.getTypeSpecType();
3759 AttributeList* attrs = DS.getAttributes().getList();
3889 StorageClassSpecToVarDeclStorageClass(const DeclSpec &DS) {
3890 DeclSpec::SCS StorageClassSpec = DS.getStorageClassSpec();
3896 if (DS.isExternInLinkageSpec())
3945 Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
3969 if (DS.getStorageClassSpec() != DeclSpec::SCS_static &&
3977 DS.SetStorageClassSpec(*this, DeclSpec::SCS_static, SourceLocation(),
3983 else if (DS.getStorageClassSpec() != DeclSpec::SCS_unspecified &&
3985 Diag(DS.getStorageClassSpecLoc(),
3987 << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());
3990 DS.SetStorageClassSpec(*this, DeclSpec::SCS_unspecified,
3997 if (DS.getTypeQualifiers()) {
3998 if (DS.getTypeQualifiers() & DeclSpec::TQ_const)
3999 Diag(DS.getConstSpecLoc(), diag::ext_anonymous_struct_union_qualified)
4001 << FixItHint::CreateRemoval(DS.getConstSpecLoc());
4002 if (DS.getTypeQualifiers() & DeclSpec::TQ_volatile)
4003 Diag(DS.getVolatileSpecLoc(),
4006 << FixItHint::CreateRemoval(DS.getVolatileSpecLoc());
4007 if (DS.getTypeQualifiers() & DeclSpec::TQ_restrict)
4008 Diag(DS.getRestrictSpecLoc(),
4011 << FixItHint::CreateRemoval(DS.getRestrictSpecLoc());
4012 if (DS.getTypeQualifiers() & DeclSpec::TQ_atomic)
4013 Diag(DS.getAtomicSpecLoc(),
4016 << FixItHint::CreateRemoval(DS.getAtomicSpecLoc());
4018 DS.ClearTypeQualifiers();
4116 Declarator Dc(DS, Declarator::MemberContext);
4124 DS.getLocStart(),
4135 DeclSpec::SCS SCSpec = DS.getStorageClassSpec();
4136 StorageClass SC = StorageClassSpecToVarDeclStorageClass(DS);
4146 DS.getLocStart(),
4209 Decl *Sema::BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS,
4214 Declarator Dc(DS, Declarator::TypeNameContext);
4224 DS.getLocStart(),
4225 DS.getLocStart(),
4423 DeclSpec &DS = D.getMutableDeclSpec();
4424 switch (DS.getTypeSpecType()) {
4431 QualType T = S.GetTypeFromParser(DS.getRepAsType(), &TSI);
4438 TSI = S.Context.getTrivialTypeSourceInfo(T, DS.getTypeSpecTypeLoc());
4446 DS.UpdateTypeRep(LocType);
4452 Expr *E = DS.getRepAsExpr();
4455 DS.UpdateExprRep(Result.get());
4961 void Sema::DiagnoseFunctionSpecifiers(const DeclSpec &DS) {
4964 if (DS.isInlineSpecified())
4965 Diag(DS.getInlineSpecLoc(),
4968 if (DS.isVirtualSpecified())
4969 Diag(DS.getVirtualSpecLoc(),
4972 if (DS.isExplicitSpecified())
4973 Diag(DS.getExplicitSpecLoc(),
4976 if (DS.isNoreturnSpecified())
4977 Diag(DS.getNoreturnSpecLoc(),
8171 void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) {
8180 Diag(DS.getStorageClassSpecLoc(), getLangOpts().CPlusPlus
8182 << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());
8184 Diag(DS.getInlineSpecLoc(), diag::err_inline_main)
8185 << FixItHint::CreateRemoval(DS.getInlineSpecLoc());
8186 if (DS.isNoreturnSpecified()) {
8187 SourceLocation NoreturnLoc = DS.getNoreturnSpecLoc();
8194 Diag(DS.getConstexprSpecLoc(), diag::err_constexpr_main)
8195 << FixItHint::CreateRemoval(DS.getConstexprSpecLoc());
9487 DeclSpec DS(Attrs.getPool().getFactory());
9491 DS.SetTypeSpecType(DeclSpec::TST_auto, IdentLoc, PrevSpec, DiagID,
9494 Declarator D(DS, Declarator::ForContext);
9504 return ActOnDeclStmt(FinalizeDeclaratorGroup(S, DS, Var), IdentLoc,
9789 Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS,
9793 if (DS.isTypeSpecOwned())
9794 Decls.push_back(DS.getRepAsDecl());
9805 if (DeclSpec::isDeclRep(DS.getTypeSpecType())) {
9806 if (TagDecl *Tag = dyn_cast_or_null<TagDecl>(DS.getRepAsDecl())) {
9813 return BuildDeclaratorGroup(Decls, DS.containsPlaceholderType());
9915 const DeclSpec &DS = D.getDeclSpec();
9921 if (DS.getStorageClassSpec() == DeclSpec::SCS_register) {
9924 DS.getStorageClassSpec() == DeclSpec::SCS_auto) {
9926 } else if (DS.getStorageClassSpec() != DeclSpec::SCS_unspecified) {
9927 Diag(DS.getStorageClassSpecLoc(),
9932 if (DeclSpec::TSCS TSCS = DS.getThreadStorageClassSpec())
9933 Diag(DS.getThreadStorageClassSpecLoc(), diag::err_invalid_thread)
9935 if (DS.isConstexprSpecified())
9936 Diag(DS.getConstexprSpecLoc(), diag::err_invalid_constexpr)
9939 DiagnoseFunctionSpecifiers(DS);
10174 DeclSpec DS(attrs);
10177 DS.SetTypeSpecType(DeclSpec::TST_int, FTI.Params[i].IdentLoc, PrevSpec,
10180 DS.SetRangeStart(FTI.Params[i].IdentLoc);
10181 DS.SetRangeEnd(FTI.Params[i].IdentLoc);
10182 Declarator ParamD(DS, Declarator::KNRTypeListContext);
10852 DeclSpec DS(attrFactory);
10854 bool Error = DS.SetTypeSpecType(DeclSpec::TST_int, Loc, Dummy, DiagID,
10859 Declarator D(DS, Declarator::BlockContext);
10882 DS.getAttributes(),