Index: src/CodeTools/TrackLoc.cc
===================================================================
--- src/CodeTools/TrackLoc.cc	(revision 698ec72fc748f1221cc0c8cf5d714510c3c4999e)
+++ src/CodeTools/TrackLoc.cc	(revision 80ac42dcb6d8ee04ca42836f7c2d59cbcc65bb01)
@@ -33,9 +33,4 @@
 
 namespace CodeTools {
-
-	std::ostream & operator<<(std::ostream & out, CodeLocation const & loc) {
-		return out << loc.filename << '[' << loc.linenumber << ']';
-	}
-
 	class LocationPrinter {
 		size_t printLevel;
@@ -95,5 +90,4 @@
 		acceptAll( translationUnit, printer );
 	}
-
 } // namespace CodeTools
 
Index: src/Common/CodeLocation.h
===================================================================
--- src/Common/CodeLocation.h	(revision 698ec72fc748f1221cc0c8cf5d714510c3c4999e)
+++ src/Common/CodeLocation.h	(revision 80ac42dcb6d8ee04ca42836f7c2d59cbcc65bb01)
@@ -16,4 +16,5 @@
 #pragma once
 
+#include <iostream>
 #include <string>
 
@@ -44,11 +45,4 @@
 	}
 
-	void unset () {
-		linenumber = -1;
-		filename = "";
-	}
-
-	// Use field access for set.
-
 	bool followedBy( CodeLocation const & other, int seperation ) {
 		return (linenumber + seperation == other.linenumber &&
@@ -65,7 +59,6 @@
 };
 
-inline std::string to_string( const CodeLocation& location ) {
-    // Column number ":1" allows IDEs to parse the error message and position the cursor in the source text.
-    return location.isSet() ? location.filename + ":" + std::to_string(location.linenumber) + ":1 " : "";
+inline std::ostream & operator<<( std::ostream & out, const CodeLocation & location ) {
+	// Column number ":1" allows IDEs to parse the error message and position the cursor in the source text.
+	return location.isSet() ? out << location.filename << ":" << location.linenumber << ":1 " : out;
 }
-
Index: src/Common/SemanticError.cc
===================================================================
--- src/Common/SemanticError.cc	(revision 698ec72fc748f1221cc0c8cf5d714510c3c4999e)
+++ src/Common/SemanticError.cc	(revision 80ac42dcb6d8ee04ca42836f7c2d59cbcc65bb01)
@@ -45,5 +45,5 @@
 	using std::to_string;
 	for( auto err : errors ) {
-		os << to_string( err.location ) << err.description << std::endl;
+		os << err.location << err.description << std::endl;
 	}
 }
