void ProtDeclaration::semantic(Scope *sc) { if (decl) { semanticNewSc(sc, sc->stc, sc->linkage, protection, 1, sc->structalign); } }
void AlignDeclaration::semantic(Scope *sc) { //printf("\tAlignDeclaration::semantic '%s'\n",toChars()); if (decl) { semanticNewSc(sc, sc->stc, sc->linkage, sc->protection, sc->explicitProtection, salign); } }
void LinkDeclaration::semantic(Scope *sc) { //printf("LinkDeclaration::semantic(linkage = %d, decl = %p)\n", linkage, decl); if (decl) { semanticNewSc(sc, sc->stc, linkage, sc->protection, sc->explicitProtection, sc->structalign); } }
void AlignDeclaration::semantic(Scope *sc) { // LDC // we only support packed structs, as from the spec: align(1) struct Packed { ... } // other alignments are simply ignored. my tests show this is what llvm-gcc does too ... { semanticNewSc(sc, sc->stc, sc->linkage, sc->protection, sc->explicitProtection, salign); } }
void AlignDeclaration::semantic(Scope *sc) { //printf("\tAlignDeclaration::semantic '%s'\n",toChars()); if (decl) { semanticNewSc(sc, sc->stc, sc->linkage, sc->protection, sc->explicitProtection, salign); } else assert(0 && "what kind of align use triggers this?"); }
void StorageClassDeclaration::semantic(Scope *sc) { if (decl) { StorageClass scstc = sc->stc; /* These sets of storage classes are mutually exclusive, * so choose the innermost or most recent one. */ if (stc & (STCauto | STCscope | STCstatic | STCextern | STCmanifest)) scstc &= ~(STCauto | STCscope | STCstatic | STCextern | STCmanifest); if (stc & (STCauto | STCscope | STCstatic | STCtls | STCmanifest | STCgshared)) scstc &= ~(STCauto | STCscope | STCstatic | STCtls | STCmanifest | STCgshared); if (stc & (STCconst | STCimmutable | STCmanifest)) scstc &= ~(STCconst | STCimmutable | STCmanifest); if (stc & (STCgshared | STCshared | STCtls)) scstc &= ~(STCgshared | STCshared | STCtls); if (stc & (STCsafe | STCtrusted | STCsystem)) scstc &= ~(STCsafe | STCtrusted | STCsystem); scstc |= stc; semanticNewSc(sc, scstc, sc->linkage, sc->protection, sc->explicitProtection, sc->structalign); } }