Index: src/AST/Util.cpp
===================================================================
--- src/AST/Util.cpp	(revision 4f6dda063e7b3a906904ff494b7cf4bb41f5a5c5)
+++ src/AST/Util.cpp	(revision 33b7d490d37c1f84e96a85cdf1c8baad2b08aeb8)
@@ -10,15 +10,14 @@
 // Created On       : Wed Jan 19  9:46:00 2022
 // Last Modified By : Andrew Beach
-// Last Modified On : Fri Feb 18  9:42:00 2022
-// Update Count     : 0
+// Last Modified On : Fri Mar 11 18:07:00 2022
+// Update Count     : 1
 //
 
 #include "Util.hpp"
 
-#include "Decl.hpp"
 #include "Node.hpp"
+#include "ParseNode.hpp"
 #include "Pass.hpp"
 #include "TranslationUnit.hpp"
-#include "Common/ScopedMap.h"
 
 #include <vector>
@@ -46,11 +45,24 @@
 };
 
+/// Check that every note that can has a set CodeLocation.
+struct SetCodeLocationsCore {
+	void previsit( const ParseNode * node ) {
+		assert( node->location.isSet() );
+	}
+};
+
 struct InvariantCore {
 	// To save on the number of visits: this is a kind of composed core.
 	// None of the passes should make changes so ordering doesn't matter.
 	NoStrongCyclesCore no_strong_cycles;
+	SetCodeLocationsCore set_code_locations;
 
 	void previsit( const Node * node ) {
 		no_strong_cycles.previsit( node );
+	}
+
+	void previsit( const ParseNode * node ) {
+		no_strong_cycles.previsit( node );
+		set_code_locations.previsit( node );
 	}
 
