Changeset 9ea38de for src/AST/Node.hpp


Ignore:
Timestamp:
Jun 25, 2019, 11:26:30 AM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
bcb311b
Parents:
28af389
Message:

Fix ast::Pass guard classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Node.hpp

    r28af389 r9ea38de  
    3030/// Keeps both strong and weak reference counts.
    3131class Node {
     32        /// call to debug on node creation/deletion
     33        void _trap();
    3234public:
    3335        // override defaults to ensure assignment doesn't
    3436        // change/share reference counts
    35         Node() = default;
    36         Node(const Node&) : strong_count(0), weak_count(0) {}
    37         Node(Node&&) : strong_count(0), weak_count(0) {}
     37        Node() { _trap(); }
     38        Node(const Node&) : strong_count(0), weak_count(0) { _trap(); }
     39        Node(Node&&) : strong_count(0), weak_count(0) { _trap(); }
    3840        Node& operator= (const Node&) = delete;
    3941        Node& operator= (Node&&) = delete;
    40         virtual ~Node() = default;
     42        virtual ~Node() { _trap(); }
    4143
    4244        virtual const Node * accept( Visitor & v ) const = 0;
Note: See TracChangeset for help on using the changeset viewer.