Changeset 10a1225 for src/AST/Node.hpp


Ignore:
Timestamp:
May 17, 2019, 12:09:51 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
896737b
Parents:
77bfc80
Message:

Many errors and warning fixes.
More visit implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Node.hpp

    r77bfc80 r10a1225  
    143143        /// Sets this pointer to a mutated version of a pointer (possibly) owned elsehere.
    144144        /// Returns a mutable version of the pointer in this node.
    145         node_t * set_and_mutate( const node_t * n ) {
    146                 // ensure ownership of `n` by this node to avoid spurious single-owner mutates
    147                 assign( n );
    148                 // get mutable version of `n`
    149                 auto r = mutate( node );
    150                 // re-assign mutable version in case `mutate()` produced a new pointer
    151                 assign( r );
    152                 return r;
    153         }
     145        node_t * set_and_mutate( const node_t * n );
    154146
    155147        using ptr = const node_t *;
Note: See TracChangeset for help on using the changeset viewer.