Ignore:
Timestamp:
Nov 20, 2015, 12:27:01 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, string, with_gc
Children:
66a2a61, 70d4b4f, 839ccbb
Parents:
258eb5c9
Message:

Fixed bug with get_baseParameters()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/ReferenceToType.cc

    r258eb5c9 red94eac  
    5959std::string StructInstType::typeString() const { return "struct"; }
    6060
    61 std::list<TypeDecl*>& StructInstType::get_baseParameters() { return baseStruct->get_parameters(); }
     61std::list<TypeDecl*>* StructInstType::get_baseParameters() {
     62        if ( ! baseStruct ) return NULL;
     63        return &baseStruct->get_parameters();
     64}
    6265
    6366void StructInstType::lookup( const std::string &name, std::list< Declaration* > &foundDecls ) const {
     
    6871std::string UnionInstType::typeString() const { return "union"; }
    6972
    70 std::list<TypeDecl*>& UnionInstType::get_baseParameters() { return baseUnion->get_parameters(); }
     73std::list<TypeDecl*>* UnionInstType::get_baseParameters() {
     74        if ( ! baseUnion ) return NULL;
     75        return &baseUnion->get_parameters();
     76}
    7177
    7278void UnionInstType::lookup( const std::string &name, std::list< Declaration* > &foundDecls ) const {
Note: See TracChangeset for help on using the changeset viewer.