stage3/forced_narrow_candidate_datatypes.cc
changeset 693 51a2fa6441b9
parent 691 958454e9e40f
child 1041 56ebe2a31b5b
equal deleted inserted replaced
692:c3287ffaee8c 693:51a2fa6441b9
   121 
   121 
   122 
   122 
   123 void forced_narrow_candidate_datatypes_c::forced_narrow_il_instruction(symbol_c *symbol, std::vector <symbol_c *> &next_il_instruction) {
   123 void forced_narrow_candidate_datatypes_c::forced_narrow_il_instruction(symbol_c *symbol, std::vector <symbol_c *> &next_il_instruction) {
   124   if (NULL == symbol->datatype) {
   124   if (NULL == symbol->datatype) {
   125     if (symbol->candidate_datatypes.empty()) {
   125     if (symbol->candidate_datatypes.empty()) {
   126       symbol->datatype = &(search_constant_type_c::invalid_type_name); // This will occur in the situations (a) in the above example
   126       symbol->datatype = &(get_datatype_info_c::invalid_type_name); // This will occur in the situations (a) in the above example
   127       // return NULL; // No need to return control to the visit() method of the base class... But we do so, just to be safe (called at the end of this function)!
   127       // return NULL; // No need to return control to the visit() method of the base class... But we do so, just to be safe (called at the end of this function)!
   128     } else {
   128     } else {
   129       if (next_il_instruction.empty()) {
   129       if (next_il_instruction.empty()) {
   130         symbol->datatype = symbol->candidate_datatypes[0]; // This will occur in the situations (b) in the above example
   130         symbol->datatype = symbol->candidate_datatypes[0]; // This will occur in the situations (b) in the above example
   131       } else {
   131       } else {