Changeset 246c245 for src/AST/Init.hpp


Ignore:
Timestamp:
May 16, 2019, 6:51:18 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8ff178d, d66e7b7
Parents:
9b4f329 (diff), 6f8e87d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Init.hpp

    r9b4f329 r246c245  
    2424
    2525// Must be included in *all* AST classes; should be #undef'd at the end of the file
    26 #define MUTATE_FRIEND template<typename node_t> friend auto mutate(const node_t * node);
     26#define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node);
    2727
    2828namespace ast {
     
    5858        const Init * accept( Visitor& v ) const override = 0;
    5959private:
    60         const Init * clone() const override = 0;
     60        Init * clone() const override = 0;
    6161        MUTATE_FRIEND
    6262};
     
    122122};
    123123
    124 
    125 //=================================================================================================
    126 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency
    127 /// remove only if there is a better solution
    128 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with
    129 /// forward declarations
    130 inline void increment( const class Init * node, Node::ref_type ref ) { node->increment( ref ); }
    131 inline void decrement( const class Init * node, Node::ref_type ref ) { node->decrement( ref ); }
    132 inline void increment( const class SingleInit * node, Node::ref_type ref ) { node->increment( ref ); }
    133 inline void decrement( const class SingleInit * node, Node::ref_type ref ) { node->decrement( ref ); }
    134 inline void increment( const class ListInit * node, Node::ref_type ref ) { node->increment( ref ); }
    135 inline void decrement( const class ListInit * node, Node::ref_type ref ) { node->decrement( ref ); }
    136 inline void increment( const class ConstructorInit * node, Node::ref_type ref ) { node->increment( ref ); }
    137 inline void decrement( const class ConstructorInit * node, Node::ref_type ref ) { node->decrement( ref ); }
    138124}
    139125
Note: See TracChangeset for help on using the changeset viewer.