Index: src/main.cc
===================================================================
--- src/main.cc	(revision 0bcc2b72f5a3e94a3801264eec1b2ad84ce633d6)
+++ src/main.cc	(revision 036dd5f58e571061f54ad771bedebece3b5039ce)
@@ -247,4 +247,9 @@
 		} // if
 
+		// Temporary: fill locations after parsing so that every node has a location, for early error messages.
+		// Eventually we should pass the locations from the parser to every node, but this quick and dirty solution
+		// works okay for now.
+		CodeTools::fillLocations( translationUnit );
+
 		// add the assignment statement after the initialization of a type parameter
 		PASS( "validate", SymTab::validate( translationUnit, symtabp ) );
