Changeset b1f2007d for src/Validate
- Timestamp:
- Dec 13, 2023, 9:17:13 AM (22 months ago)
- Branches:
- master
- Children:
- 4c2fe47
- Parents:
- c40157e
- Location:
- src/Validate
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/FixQualifiedTypes.cpp
rc40157e rb1f2007d 9 9 // Author : Andrew Beach 10 10 // Created On : Thr Apr 21 11:13:00 2022 11 // Last Modified By : Andrew Beach12 // Last Modified On : Tue Sep 20 16:15:00 202213 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 13 09:00:25 2023 13 // Update Count : 6 14 14 // 15 15 … … 41 41 auto td = symtab.globalLookupType( inst->name ); 42 42 if ( !td ) { 43 SemanticError( *location, toString("Use of undefined global type ", inst->name) );43 SemanticError( *location, "Use of undefined global type %s.", inst->name.c_str() ); 44 44 } 45 45 auto base = td->base; … … 50 50 } else { 51 51 // .T => T is not a type name. 52 assertf( false, "unhandled global qualified child type: %s", toCString( child) );52 assertf( false, "unhandled global qualified child type: %s", toCString( child ) ); 53 53 } 54 54 } else { … … 63 63 instp = inst; 64 64 } else { 65 SemanticError( *location, toString("Qualified type requires an aggregate on the left, but has: ", parent) );65 SemanticError( *location, "Qualified type requires an aggregate on the left, but has %s.", toCString( parent ) ); 66 66 } 67 67 // TODO: Need to handle forward declarations. … … 81 81 } else { 82 82 // S.T - S is not an aggregate => error. 83 assertf( false, "unhandled qualified child type : %s", toCString(type) );83 assertf( false, "unhandled qualified child type %s.", toCString( type ) ); 84 84 } 85 85 } 86 86 // failed to find a satisfying definition of type 87 SemanticError( *location, toString("Undefined type in qualified type: ", type) );87 SemanticError( *location, "Undefined type in qualified type %s", toCString( type ) ); 88 88 } 89 89 } -
src/Validate/ForallPointerDecay.cpp
rc40157e rb1f2007d 9 9 // Author : Andrew Beach 10 10 // Created On : Tue Dec 7 16:15:00 2021 11 // Last Modified By : Andrew Beach12 // Last Modified On : S at Apr 23 13:10:00 202213 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Nov 26 18:49:57 2023 13 // Update Count : 2 14 14 // 15 15 … … 213 213 auto type = obj->type->stripDeclarator(); 214 214 if ( dynamic_cast< const ast::FunctionType * >( type ) ) return; 215 SemanticError( obj->location, 216 toCString( "operator ", obj->name.c_str(), 217 " is not a function or function pointer." ) ); 215 SemanticError( obj->location, "operator %s is not a function or function pointer.", obj->name.c_str() ); 218 216 } 219 217 }; -
src/Validate/ReplaceTypedef.cpp
rc40157e rb1f2007d 9 9 // Author : Andrew Beach 10 10 // Created On : Tue Jun 29 14:59:00 2022 11 // Last Modified By : Andrew Beach12 // Last Modified On : Tue Sep 20 17:00:00 202213 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Nov 27 08:55:06 2023 13 // Update Count : 3 14 14 // 15 15 … … 111 111 if ( !rtt ) { 112 112 assert( location ); 113 SemanticError( *location, "Cannot apply type parameters to base type of " + type->name);113 SemanticError( *location, "Cannot apply type parameters to base type of %s.", type->name.c_str() ); 114 114 } 115 115 rtt->params.clear(); … … 125 125 if ( base == typedeclNames.end() ) { 126 126 assert( location ); 127 SemanticError( *location, toString( "Use of undefined type ", type->name) );127 SemanticError( *location, "Use of undefined type %s.", type->name.c_str() ); 128 128 } 129 129 return ast::mutate_field( type, &ast::TypeInstType::base, base->second );
Note:
See TracChangeset
for help on using the changeset viewer.