Changeset 33a7b6d for src/SynTree
- Timestamp:
- Nov 15, 2016, 5:30:52 PM (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:
- d9fa60a
- Parents:
- 8f9cc50
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/ReferenceToType.cc
r8f9cc50 r33a7b6d 46 46 47 47 namespace { 48 void doLookup( const std::list< Declaration* > &members, const std::list< TypeDecl* > &parms, const std::list< Expression* > &args, const std::string &name, std::list< Declaration* > &foundDecls ) { 49 std::list< Declaration* > found; 48 void doLookup( const std::list< Declaration* > &members, const std::string &name, std::list< Declaration* > &foundDecls ) { 50 49 for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) { 51 50 if ( (*i)->get_name() == name ) { 52 found .push_back( *i );51 foundDecls.push_back( *i ); 53 52 } // if 54 53 } // for 55 applySubstitution( parms.begin(), parms.end(), args.begin(), found.begin(), found.end(), back_inserter( foundDecls ) );56 54 } 57 55 } // namespace … … 68 66 void StructInstType::lookup( const std::string &name, std::list< Declaration* > &foundDecls ) const { 69 67 assert( baseStruct ); 70 doLookup( baseStruct->get_members(), baseStruct->get_parameters(), parameters,name, foundDecls );68 doLookup( baseStruct->get_members(), name, foundDecls ); 71 69 } 72 70 … … 94 92 void UnionInstType::lookup( const std::string &name, std::list< Declaration* > &foundDecls ) const { 95 93 assert( baseUnion ); 96 doLookup( baseUnion->get_members(), baseUnion->get_parameters(), parameters,name, foundDecls );94 doLookup( baseUnion->get_members(), name, foundDecls ); 97 95 } 98 96
Note: See TracChangeset
for help on using the changeset viewer.