diff dmd/AssertExp.d @ 72:2e2a5c3f943a

reduced warnings by adding override to the methods think this also normalizes different line endings used all over the place
author Trass3r
date Sat, 28 Aug 2010 16:19:48 +0200
parents cab4c37afb89
children e28b18c23469
line wrap: on
line diff
--- a/dmd/AssertExp.d	Sat Aug 28 16:14:07 2010 +0200
+++ b/dmd/AssertExp.d	Sat Aug 28 16:19:48 2010 +0200
@@ -1,20 +1,20 @@
-module dmd.AssertExp;
-
-import dmd.Expression;
-import dmd.backend.elem;
-import dmd.UnaExp;
-import dmd.InterState;
-import dmd.OutBuffer;
-import dmd.Loc;
-import dmd.Scope;
-import dmd.InlineCostState;
-import dmd.InlineDoState;
-import dmd.IRState;
-import dmd.HdrGenState;
+module dmd.AssertExp;
+
+import dmd.Expression;
+import dmd.backend.elem;
+import dmd.UnaExp;
+import dmd.InterState;
+import dmd.OutBuffer;
+import dmd.Loc;
+import dmd.Scope;
+import dmd.InlineCostState;
+import dmd.InlineDoState;
+import dmd.IRState;
+import dmd.HdrGenState;
 import dmd.InlineScanState;
 import dmd.Type;
 import dmd.Global;
-import dmd.InvariantDeclaration;
+import dmd.InvariantDeclaration;
 import dmd.TOK;
 import dmd.TY;
 import dmd.TypeClass;
@@ -31,7 +31,7 @@
 import dmd.backend.Symbol;
 import dmd.backend.dt_t;
 import dmd.backend.SC;
-import dmd.backend.FL;
+import dmd.backend.FL;
 
 import core.stdc.string;
 import std.string : toStringz;
@@ -39,7 +39,7 @@
 static __gshared Symbol* assertexp_sfilename = null;
 static __gshared string assertexp_name = null;
 static __gshared Module assertexp_mn = null;
-
+
 class AssertExp : UnaExp
 {
 	Expression msg;
@@ -50,14 +50,14 @@
 		this.msg = msg;
 	}
 
-	Expression syntaxCopy()
+	override Expression syntaxCopy()
 	{
-		AssertExp ae = new AssertExp(loc, e1.syntaxCopy(),
-				       msg ? msg.syntaxCopy() : null);
+		AssertExp ae = new AssertExp(loc, e1.syntaxCopy(),
+				       msg ? msg.syntaxCopy() : null);
 		return ae;
 	}
 
-	Expression semantic(Scope sc)
+	override Expression semantic(Scope sc)
 	{
 	version (LOGSEMANTIC) {
 		printf("AssertExp.semantic('%s')\n", toChars());
@@ -90,18 +90,18 @@
 		return this;
 	}
 
-	Expression interpret(InterState istate)
+	override Expression interpret(InterState istate)
 	{
 		assert(false);
 	}
 
-	bool checkSideEffect(int flag)
+	override bool checkSideEffect(int flag)
 	{
 		return true;
 	}
 
 version (DMDV2) {
-	bool canThrow()
+	override bool canThrow()
 	{
 		/* assert()s are non-recoverable errors, so functions that
 		 * use them can be considered "nothrow"
@@ -109,17 +109,17 @@
 		return 0; //(global.params.useAssert != 0);
 	}
 }
-	void toCBuffer(OutBuffer buf, HdrGenState* hgs)
+	override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
 	{
 		assert(false);
 	}
 
-	int inlineCost(InlineCostState* ics)
+	override int inlineCost(InlineCostState* ics)
 	{
 		return 1 + e1.inlineCost(ics) + (msg ? msg.inlineCost(ics) : 0);
 	}
 
-	Expression doInline(InlineDoState ids)
+	override Expression doInline(InlineDoState ids)
 	{
 		AssertExp ae = cast(AssertExp)copy();
 
@@ -129,7 +129,7 @@
 		return ae;
 	}
 
-	Expression inlineScan(InlineScanState* iss)
+	override Expression inlineScan(InlineScanState* iss)
 	{
 		e1 = e1.inlineScan(iss);
 		if (msg)
@@ -142,7 +142,7 @@
 		return cast(void*)i;
 	}
 
-	elem* toElem(IRState* irs)
+	override elem* toElem(IRState* irs)
 	{
 		elem* e;
 		elem* ea;
@@ -223,7 +223,7 @@
 					efilename = el_var(assertexp_sfilename);
 
 					if (msg)
-					{   
+					{   
 						elem* emsg = msg.toElem(irs);
 						ea = el_var(rtlsym[RTLSYM_DASSERT_MSG]);
 						ea = el_bin(OPcall, TYvoid, ea, el_params(el_long(TYint, loc.linnum), efilename, emsg, null));