Skip to content

Commit

Permalink
Merge pull request #5091 from yebblies/override
Browse files Browse the repository at this point in the history
Add deprecated missing overrides
  • Loading branch information
9rnsr committed Sep 18, 2015
2 parents 61e1016 + 095a84b commit 3bcb611
Show file tree
Hide file tree
Showing 49 changed files with 2,260 additions and 2,260 deletions.
20 changes: 10 additions & 10 deletions src/aggregate.d
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ public:
getRTInfo = null;
}

final void setScope(Scope* sc)
override final void setScope(Scope* sc)
{
if (sizeok == SIZEOKdone)
return;
ScopeDsymbol.setScope(sc);
}

final void semantic2(Scope* sc)
override final void semantic2(Scope* sc)
{
//printf("AggregateDeclaration::semantic2(%s) type = %s, errors = %d\n", toChars(), type->toChars(), errors);
if (!members)
Expand Down Expand Up @@ -159,7 +159,7 @@ public:
sc2.pop();
}

final void semantic3(Scope* sc)
override final void semantic3(Scope* sc)
{
//printf("AggregateDeclaration::semantic3(%s) type = %s, errors = %d\n", toChars(), type->toChars(), errors);
if (!members)
Expand Down Expand Up @@ -212,7 +212,7 @@ public:
sd.semanticTypeInfoMembers();
}

final uint size(Loc loc)
override final uint size(Loc loc)
{
//printf("AggregateDeclaration::size() %s, scope = %p\n", toChars(), scope);
if (loc.linnum == 0)
Expand Down Expand Up @@ -571,13 +571,13 @@ public:
return memoffset;
}

final Type getType()
override final Type getType()
{
return type;
}

// is aggregate deprecated?
final bool isDeprecated()
override final bool isDeprecated()
{
return isdeprecated;
}
Expand Down Expand Up @@ -642,7 +642,7 @@ public:
}
}

final bool isExport()
override final bool isExport()
{
return protection.kind == PROTexport;
}
Expand All @@ -665,7 +665,7 @@ public:
return s;
}

final Prot prot()
override final Prot prot()
{
return protection;
}
Expand All @@ -680,12 +680,12 @@ public:
Symbol* stag; // tag symbol for debug data
Symbol* sinit;

final AggregateDeclaration isAggregateDeclaration()
override final AggregateDeclaration isAggregateDeclaration()
{
return this;
}

void accept(Visitor v)
override void accept(Visitor v)
{
v.visit(this);
}
Expand Down
8 changes: 4 additions & 4 deletions src/aliasthis.d
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public:
this.ident = ident;
}

Dsymbol syntaxCopy(Dsymbol s)
override Dsymbol syntaxCopy(Dsymbol s)
{
assert(!s);
/* Since there is no semantic information stored here,
Expand All @@ -48,7 +48,7 @@ public:
return this;
}

void semantic(Scope* sc)
override void semantic(Scope* sc)
{
Dsymbol p = sc.parent.pastMixin();
AggregateDeclaration ad = p.isAggregateDeclaration();
Expand Down Expand Up @@ -100,7 +100,7 @@ public:
ad.aliasthis = s;
}

const(char)* kind()
override const(char)* kind()
{
return "alias this";
}
Expand All @@ -110,7 +110,7 @@ public:
return this;
}

void accept(Visitor v)
override void accept(Visitor v)
{
v.visit(this);
}
Expand Down
28 changes: 14 additions & 14 deletions src/apply.d
Original file line number Diff line number Diff line change
Expand Up @@ -56,67 +56,67 @@ public:
return true;
}

void visit(Expression e)
override void visit(Expression e)
{
applyTo(e);
}

void visit(NewExp e)
override void visit(NewExp e)
{
//printf("NewExp::apply(): %s\n", toChars());
doCond(e.thisexp) || doCond(e.newargs) || doCond(e.arguments) || applyTo(e);
}

void visit(NewAnonClassExp e)
override void visit(NewAnonClassExp e)
{
//printf("NewAnonClassExp::apply(): %s\n", toChars());
doCond(e.thisexp) || doCond(e.newargs) || doCond(e.arguments) || applyTo(e);
}

void visit(UnaExp e)
override void visit(UnaExp e)
{
doCond(e.e1) || applyTo(e);
}

void visit(BinExp e)
override void visit(BinExp e)
{
doCond(e.e1) || doCond(e.e2) || applyTo(e);
}

void visit(AssertExp e)
override void visit(AssertExp e)
{
//printf("CallExp::apply(apply_fp_t fp, void *param): %s\n", toChars());
doCond(e.e1) || doCond(e.msg) || applyTo(e);
}

void visit(CallExp e)
override void visit(CallExp e)
{
//printf("CallExp::apply(apply_fp_t fp, void *param): %s\n", toChars());
doCond(e.e1) || doCond(e.arguments) || applyTo(e);
}

void visit(ArrayExp e)
override void visit(ArrayExp e)
{
//printf("ArrayExp::apply(apply_fp_t fp, void *param): %s\n", toChars());
doCond(e.e1) || doCond(e.arguments) || applyTo(e);
}

void visit(SliceExp e)
override void visit(SliceExp e)
{
doCond(e.e1) || doCond(e.lwr) || doCond(e.upr) || applyTo(e);
}

void visit(ArrayLiteralExp e)
override void visit(ArrayLiteralExp e)
{
doCond(e.elements) || applyTo(e);
}

void visit(AssocArrayLiteralExp e)
override void visit(AssocArrayLiteralExp e)
{
doCond(e.keys) || doCond(e.values) || applyTo(e);
}

void visit(StructLiteralExp e)
override void visit(StructLiteralExp e)
{
if (e.stageflags & stageApply)
return;
Expand All @@ -126,12 +126,12 @@ public:
e.stageflags = old;
}

void visit(TupleExp e)
override void visit(TupleExp e)
{
doCond(e.e0) || doCond(e.exps) || applyTo(e);
}

void visit(CondExp e)
override void visit(CondExp e)
{
doCond(e.econd) || doCond(e.e1) || doCond(e.e2) || applyTo(e);
}
Expand Down
24 changes: 12 additions & 12 deletions src/argtypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ extern (C++) TypeTuple toArgTypes(Type t)
result = null;
}

void visit(Type)
override void visit(Type)
{
// not valid for a parameter
}

void visit(TypeError)
override void visit(TypeError)
{
result = new TypeTuple(Type.terror);
}

void visit(TypeBasic t)
override void visit(TypeBasic t)
{
Type t1 = null;
Type t2 = null;
Expand Down Expand Up @@ -116,12 +116,12 @@ extern (C++) TypeTuple toArgTypes(Type t)
result = new TypeTuple();
}

void visit(TypeVector t)
override void visit(TypeVector t)
{
result = new TypeTuple(t);
}

void visit(TypeSArray t)
override void visit(TypeSArray t)
{
if (t.dim)
{
Expand All @@ -140,12 +140,12 @@ extern (C++) TypeTuple toArgTypes(Type t)
result = new TypeTuple(); // pass on the stack for efficiency
}

void visit(TypeAArray)
override void visit(TypeAArray)
{
result = new TypeTuple(Type.tvoidptr);
}

void visit(TypePointer)
override void visit(TypePointer)
{
result = new TypeTuple(Type.tvoidptr);
}
Expand Down Expand Up @@ -235,7 +235,7 @@ extern (C++) TypeTuple toArgTypes(Type t)
return t;
}

void visit(TypeDArray)
override void visit(TypeDArray)
{
/* Should be done as if it were:
* struct S { size_t length; void* ptr; }
Expand All @@ -254,7 +254,7 @@ extern (C++) TypeTuple toArgTypes(Type t)
result = new TypeTuple(Type.tsize_t, Type.tvoidptr);
}

void visit(TypeDelegate)
override void visit(TypeDelegate)
{
/* Should be done as if it were:
* struct S { size_t length; void* ptr; }
Expand All @@ -273,7 +273,7 @@ extern (C++) TypeTuple toArgTypes(Type t)
result = new TypeTuple(Type.tvoidptr, Type.tvoidptr);
}

void visit(TypeStruct t)
override void visit(TypeStruct t)
{
//printf("TypeStruct::toArgTypes() %s\n", t->toChars());
if (!t.sym.isPOD() || t.sym.fields.dim == 0)
Expand Down Expand Up @@ -436,12 +436,12 @@ extern (C++) TypeTuple toArgTypes(Type t)
goto Lmemory;
}

void visit(TypeEnum t)
override void visit(TypeEnum t)
{
t.toBasetype().accept(this);
}

void visit(TypeClass)
override void visit(TypeClass)
{
result = new TypeTuple(Type.tvoidptr);
}
Expand Down
Loading

0 comments on commit 3bcb611

Please sign in to comment.