Changeset 41b24c8 for src/AST/Init.hpp
- Timestamp:
- May 16, 2019, 4:23:47 PM (5 years ago)
- 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:
- acd80b4
- Parents:
- e61207e7 (diff), c671112 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Init.hpp
re61207e7 r41b24c8 23 23 #include "Visitor.hpp" 24 24 25 // 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 node_t * mutate(const node_t * node); 27 25 28 namespace ast { 26 29 … … 40 43 private: 41 44 Designation* clone() const override { return new Designation{ *this }; } 45 MUTATE_FRIEND 42 46 }; 43 47 … … 55 59 private: 56 60 Init * clone() const override = 0; 61 MUTATE_FRIEND 57 62 }; 58 63 … … 69 74 private: 70 75 SingleInit * clone() const override { return new SingleInit{ *this }; } 71 72 /// Must be copied in ALL derived classes 73 template<typename node_t> 74 friend node_t * mutate(const node_t * node); 76 MUTATE_FRIEND 75 77 }; 76 78 … … 97 99 private: 98 100 ListInit * clone() const override { return new ListInit{ *this }; } 99 100 /// Must be copied in ALL derived classes 101 template<typename node_t> 102 friend node_t * mutate(const node_t * node); 101 MUTATE_FRIEND 103 102 }; 104 103 … … 120 119 private: 121 120 ConstructorInit * clone() const override { return new ConstructorInit{ *this }; } 122 123 /// Must be copied in ALL derived classes 124 template<typename node_t> 125 friend node_t * mutate(const node_t * node); 121 MUTATE_FRIEND 126 122 }; 127 123 128 124 } 125 126 #undef MUTATE_FRIEND 129 127 130 128 // Local Variables: //
Note: See TracChangeset
for help on using the changeset viewer.