Mercurial > projects > ldc
comparison dmd/declaration.h @ 1530:05c235309d6f
Make the auto storage class never have the same meaning as scope.
This changes the meaning of
auto class MyClass {} and
auto MyClass ident;
Both have been made an error to prevent accidents.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 12 Jul 2009 16:15:21 +0200 |
parents | df11cdec45a2 |
children | def7a1d494fd |
comparison
equal
deleted
inserted
replaced
1529:ad7f2f1862d6 | 1530:05c235309d6f |
---|---|
128 int isFinal() { return storage_class & STCfinal; } | 128 int isFinal() { return storage_class & STCfinal; } |
129 int isAbstract() { return storage_class & STCabstract; } | 129 int isAbstract() { return storage_class & STCabstract; } |
130 int isConst() { return storage_class & STCconst; } | 130 int isConst() { return storage_class & STCconst; } |
131 int isInvariant() { return 0; } | 131 int isInvariant() { return 0; } |
132 int isAuto() { return storage_class & STCauto; } | 132 int isAuto() { return storage_class & STCauto; } |
133 int isScope() { return storage_class & (STCscope | STCauto); } | 133 int isScope() { return storage_class & STCscope; } |
134 int isSynchronized() { return storage_class & STCsynchronized; } | 134 int isSynchronized() { return storage_class & STCsynchronized; } |
135 int isParameter() { return storage_class & STCparameter; } | 135 int isParameter() { return storage_class & STCparameter; } |
136 int isDeprecated() { return storage_class & STCdeprecated; } | 136 int isDeprecated() { return storage_class & STCdeprecated; } |
137 int isOverride() { return storage_class & STCoverride; } | 137 int isOverride() { return storage_class & STCoverride; } |
138 | 138 |
252 | 252 |
253 struct VarDeclaration : Declaration | 253 struct VarDeclaration : Declaration |
254 { | 254 { |
255 Initializer *init; | 255 Initializer *init; |
256 unsigned offset; | 256 unsigned offset; |
257 int noauto; // no auto semantics | 257 int noscope; // no scope semantics |
258 int nestedref; // referenced by a lexically nested function | 258 int nestedref; // referenced by a lexically nested function |
259 int ctorinit; // it has been initialized in a ctor | 259 int ctorinit; // it has been initialized in a ctor |
260 int onstack; // 1: it has been allocated on the stack | 260 int onstack; // 1: it has been allocated on the stack |
261 // 2: on stack, run destructor anyway | 261 // 2: on stack, run destructor anyway |
262 int canassign; // it can be assigned to | 262 int canassign; // it can be assigned to |
277 #endif | 277 #endif |
278 int needThis(); | 278 int needThis(); |
279 int isImportedSymbol(); | 279 int isImportedSymbol(); |
280 int isDataseg(); | 280 int isDataseg(); |
281 int hasPointers(); | 281 int hasPointers(); |
282 Expression *callAutoDtor(); | 282 Expression *callScopeDtor(); |
283 ExpInitializer *getExpInitializer(); | 283 ExpInitializer *getExpInitializer(); |
284 void checkCtorConstInit(); | 284 void checkCtorConstInit(); |
285 void checkNestedReference(Scope *sc, Loc loc); | 285 void checkNestedReference(Scope *sc, Loc loc); |
286 Dsymbol *toAlias(); | 286 Dsymbol *toAlias(); |
287 | 287 |