Lines Matching refs:DeclSpec
38 #include "clang/Sema/DeclSpec.h"
462 DeclSpec::TST Sema::isTagName(IdentifierInfo &II, Scope *S) {
470 case TTK_Struct: return DeclSpec::TST_struct;
471 case TTK_Interface: return DeclSpec::TST_interface;
472 case TTK_Union: return DeclSpec::TST_union;
473 case TTK_Class: return DeclSpec::TST_class;
474 case TTK_Enum: return DeclSpec::TST_enum;
478 return DeclSpec::TST_unspecified;
3274 /// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with
3277 DeclSpec &DS) {
3308 /// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with
3312 DeclSpec &DS,
3317 if (DS.getTypeSpecType() == DeclSpec::TST_class ||
3318 DS.getTypeSpecType() == DeclSpec::TST_struct ||
3319 DS.getTypeSpecType() == DeclSpec::TST_interface ||
3320 DS.getTypeSpecType() == DeclSpec::TST_union ||
3321 DS.getTypeSpecType() == DeclSpec::TST_enum) {
3346 if (TypeQuals & DeclSpec::TQ_restrict)
3357 << (DS.getTypeSpecType() == DeclSpec::TST_class ? 0 :
3358 DS.getTypeSpecType() == DeclSpec::TST_struct ? 1 :
3359 DS.getTypeSpecType() == DeclSpec::TST_interface ? 2 :
3360 DS.getTypeSpecType() == DeclSpec::TST_union ? 3 : 4);
3387 << (DS.getTypeSpecType() == DeclSpec::TST_class ? 0 :
3388 DS.getTypeSpecType() == DeclSpec::TST_struct ? 1 :
3389 DS.getTypeSpecType() == DeclSpec::TST_interface ? 2 :
3390 DS.getTypeSpecType() == DeclSpec::TST_union ? 3 : 4)
3401 DS.getStorageClassSpec() != DeclSpec::SCS_typedef) {
3413 DS.getStorageClassSpec() == DeclSpec::SCS_unspecified) {
3420 (DS.getTypeSpecType() == DeclSpec::TST_typename &&
3429 if (DS.getTypeSpecType() == DeclSpec::TST_error ||
3434 DS.getStorageClassSpec() != DeclSpec::SCS_typedef)
3442 if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef)
3487 if (DeclSpec::SCS SCS = DS.getStorageClassSpec()) {
3488 if (SCS == DeclSpec::SCS_mutable)
3492 else if (!DS.isExternInLinkageSpec() && SCS != DeclSpec::SCS_typedef)
3494 << DeclSpec::getSpecifierName(SCS);
3497 if (DeclSpec::TSCS TSCS = DS.getThreadStorageClassSpec())
3499 << DeclSpec::getSpecifierName(TSCS);
3501 if (DS.getTypeQualifiers() & DeclSpec::TQ_const)
3503 if (DS.getTypeQualifiers() & DeclSpec::TQ_volatile)
3506 if (DS.getTypeQualifiers() & DeclSpec::TQ_atomic)
3514 DeclSpec::TST TypeSpecType = DS.getTypeSpecType();
3515 if (TypeSpecType == DeclSpec::TST_class ||
3516 TypeSpecType == DeclSpec::TST_struct ||
3517 TypeSpecType == DeclSpec::TST_interface ||
3518 TypeSpecType == DeclSpec::TST_union ||
3519 TypeSpecType == DeclSpec::TST_enum) {
3524 << (TypeSpecType == DeclSpec::TST_class ? 0 :
3525 TypeSpecType == DeclSpec::TST_struct ? 1 :
3526 TypeSpecType == DeclSpec::TST_union ? 2 :
3527 TypeSpecType == DeclSpec::TST_interface ? 3 : 4);
3645 /// StorageClassSpecToVarDeclStorageClass - Maps a DeclSpec::SCS to
3649 StorageClassSpecToVarDeclStorageClass(const DeclSpec &DS) {
3650 DeclSpec::SCS StorageClassSpec = DS.getStorageClassSpec();
3651 assert(StorageClassSpec != DeclSpec::SCS_typedef &&
3654 case DeclSpec::SCS_unspecified: return SC_None;
3655 case DeclSpec::SCS_extern:
3659 case DeclSpec::SCS_static: return SC_Static;
3660 case DeclSpec::SCS_auto: return SC_Auto;
3661 case DeclSpec::SCS_register: return SC_Register;
3662 case DeclSpec::SCS_private_extern: return SC_PrivateExtern;
3664 case DeclSpec::SCS_mutable: // Fall through.
3665 case DeclSpec::SCS_typedef: return SC_None;
3705 Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
3729 if (DS.getStorageClassSpec() != DeclSpec::SCS_static &&
3737 DS.SetStorageClassSpec(*this, DeclSpec::SCS_static, SourceLocation(),
3743 else if (DS.getStorageClassSpec() != DeclSpec::SCS_unspecified &&
3750 DS.SetStorageClassSpec(*this, DeclSpec::SCS_unspecified,
3758 if (DS.getTypeQualifiers() & DeclSpec::TQ_const)
3762 if (DS.getTypeQualifiers() & DeclSpec::TQ_volatile)
3767 if (DS.getTypeQualifiers() & DeclSpec::TQ_restrict)
3772 if (DS.getTypeQualifiers() & DeclSpec::TQ_atomic)
3895 DeclSpec::SCS SCSpec = DS.getStorageClassSpec();
3897 if (SCSpec == DeclSpec::SCS_mutable) {
3968 Decl *Sema::BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS,
4179 DeclSpec &DS = D.getMutableDeclSpec();
4181 case DeclSpec::TST_typename:
4182 case DeclSpec::TST_typeofType:
4183 case DeclSpec::TST_underlyingType:
4184 case DeclSpec::TST_atomic: {
4206 case DeclSpec::TST_decltype:
4207 case DeclSpec::TST_typeofExpr: {
4443 if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef)
4468 if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef)
4471 (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_extern ||
4477 D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_static)
4532 D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_typedef)
4543 if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef) {
4731 void Sema::DiagnoseFunctionSpecifiers(const DeclSpec &DS) {
5160 // Check decl attributes on the DeclSpec.
5207 DeclSpec::SCS SCSpec = D.getDeclSpec().getStorageClassSpec();
5244 if (SCSpec == DeclSpec::SCS_mutable) {
5252 if (getLangOpts().CPlusPlus11 && SCSpec == DeclSpec::SCS_register &&
5488 if (DeclSpec::TSCS TSCS = D.getDeclSpec().getThreadStorageClassSpec()) {
5496 if (SCSpec == DeclSpec::SCS_unspecified &&
5497 TSCS == DeclSpec::TSCS_thread_local &&
5503 << DeclSpec::getSpecifierName(TSCS);
6426 case DeclSpec::SCS_auto:
6427 case DeclSpec::SCS_register:
6428 case DeclSpec::SCS_mutable:
6433 case DeclSpec::SCS_unspecified: break;
6434 case DeclSpec::SCS_extern:
6438 case DeclSpec::SCS_static: {
6451 case DeclSpec::SCS_private_extern: return SC_PrivateExtern;
6790 if (DeclSpec::TSCS TSCS = D.getDeclSpec().getThreadStorageClassSpec())
6793 << DeclSpec::getSpecifierName(TSCS);
7917 void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) {
9023 DeclSpec DS(Attrs.getPool().getFactory());
9027 DS.SetTypeSpecType(DeclSpec::TST_auto, IdentLoc, PrevSpec, DiagID,
9317 Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS,
9333 if (DeclSpec::isDeclRep(DS.getTypeSpecType())) {
9440 const DeclSpec &DS = D.getDeclSpec();
9446 if (DS.getStorageClassSpec() == DeclSpec::SCS_register) {
9449 DS.getStorageClassSpec() == DeclSpec::SCS_auto) {
9451 } else if (DS.getStorageClassSpec() != DeclSpec::SCS_unspecified) {
9457 if (DeclSpec::TSCS TSCS = DS.getThreadStorageClassSpec())
9459 << DeclSpec::getSpecifierName(TSCS);
9700 DeclSpec DS(attrs);
9703 DS.SetTypeSpecType(DeclSpec::TST_int, FTI.Params[i].IdentLoc, PrevSpec,
10319 DeclSpec DS(attrFactory);
10321 bool Error = DS.SetTypeSpecType(DeclSpec::TST_int, Loc, Dummy, DiagID,
10462 assert(D.getIdentifier() && "Wrong callback for declspec without declarator");
11757 if (DeclSpec::TSCS TSCS = D.getDeclSpec().getThreadStorageClassSpec())
11760 << DeclSpec::getSpecifierName(TSCS);
11794 = (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_mutable);