Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- a/dmd/declaration.h Fri Jul 10 21:30:02 2009 +0200 +++ b/dmd/declaration.h Sun Jul 12 16:15:21 2009 +0200 @@ -130,7 +130,7 @@ int isConst() { return storage_class & STCconst; } int isInvariant() { return 0; } int isAuto() { return storage_class & STCauto; } - int isScope() { return storage_class & (STCscope | STCauto); } + int isScope() { return storage_class & STCscope; } int isSynchronized() { return storage_class & STCsynchronized; } int isParameter() { return storage_class & STCparameter; } int isDeprecated() { return storage_class & STCdeprecated; } @@ -254,7 +254,7 @@ { Initializer *init; unsigned offset; - int noauto; // no auto semantics + int noscope; // no scope semantics int nestedref; // referenced by a lexically nested function int ctorinit; // it has been initialized in a ctor int onstack; // 1: it has been allocated on the stack @@ -279,7 +279,7 @@ int isImportedSymbol(); int isDataseg(); int hasPointers(); - Expression *callAutoDtor(); + Expression *callScopeDtor(); ExpInitializer *getExpInitializer(); void checkCtorConstInit(); void checkNestedReference(Scope *sc, Loc loc);