Changeset ce8c12f for src/SymTab
- Timestamp:
- May 15, 2017, 11:30:26 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- d36c117
- Parents:
- 65aca88
- Location:
- src/SymTab
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
r65aca88 rce8c12f 176 176 FunctionType * ftype = funcDecl->get_functionType(); 177 177 assert( ! ftype->get_parameters().empty() ); 178 Type * t = safe_dynamic_cast< PointerType * >( ftype->get_parameters().front()->get_type() )->get_base(); 178 Type * t = InitTweak::getPointerBase( ftype->get_parameters().front()->get_type() ); 179 assert( t ); 179 180 map.insert( Mangler::mangleType( t ), true ); 180 181 } -
src/SymTab/Indexer.cc
r65aca88 rce8c12f 156 156 assert( ! params.empty() ); 157 157 // use base type of pointer, so that qualifiers on the pointer type aren't considered. 158 Type * base = safe_dynamic_cast< PointerType * >( params.front()->get_type() )->get_base(); 158 Type * base = InitTweak::getPointerBase( params.front()->get_type() ); 159 assert( base ); 159 160 funcMap[ Mangler::mangle( base ) ] += function; 160 161 } else { -
src/SymTab/Validate.cc
r65aca88 rce8c12f 818 818 } 819 819 PointerType * ptrType = dynamic_cast< PointerType * >( params.front()->get_type() ); 820 if ( ! ptrType || ptrType->is_array() ) { 820 ReferenceType * refType = dynamic_cast< ReferenceType * >( params.front()->get_type() ); 821 if ( ( ! ptrType && ! refType ) || ( ptrType && ptrType->is_array() ) ) { 821 822 throw SemanticError( "First parameter of a constructor, destructor, or assignment function must be a pointer ", funcDecl ); 822 823 }
Note: See TracChangeset
for help on using the changeset viewer.