Stop lvalue check from segfaulting when coming across buggy IL code (IL operator with no operand!)
authormjsousa
Tue, 20 Aug 2013 11:11:09 +0100
changeset 833 27f246b35ac2
parent 832 8cd104e483c6
child 834 783ef40344dd
Stop lvalue check from segfaulting when coming across buggy IL code (IL operator with no operand!)
stage3/lvalue_check.cc
--- a/stage3/lvalue_check.cc	Tue Aug 20 11:08:15 2013 +0100
+++ b/stage3/lvalue_check.cc	Tue Aug 20 11:11:09 2013 +0100
@@ -243,6 +243,7 @@
 
 
 void lvalue_check_c::verify_is_lvalue(symbol_c *lvalue) {
+	if (NULL == lvalue) return; // missing operand in source code being compiled. Error will be caught and reported by datatype checking!
 	int init_error_count = error_count;  /* stop the checks once an error has been found... */
 	if (error_count == init_error_count)  check_assignment_to_expression(lvalue);
 	if (error_count == init_error_count)  check_assignment_to_controlvar(lvalue);