Changes in src/AST/Init.hpp [16ba4a6f:234b1cb]
- File:
-
- 1 edited
-
src/AST/Init.hpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Init.hpp
r16ba4a6f r234b1cb 25 25 26 26 // Must be included in *all* AST classes; should be #undef'd at the end of the file 27 #define MUTATE_FRIEND \ 28 template<typename node_t> friend node_t * mutate(const node_t * node); \ 29 template<typename node_t> friend node_t * shallowCopy(const node_t * node); 27 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node); 30 28 31 29 namespace ast { … … 50 48 51 49 /// Flag for whether to construct from initialzier 52 enum ConstructFlag { NoConstruct, MaybeConstruct };50 enum ConstructFlag { DoConstruct, MaybeConstruct }; 53 51 54 52 /// Object initializer base class … … 71 69 ptr<Expr> value; 72 70 73 SingleInit( const CodeLocation & loc, const Expr * val, ConstructFlag mc = NoConstruct )71 SingleInit( const CodeLocation & loc, const Expr * val, ConstructFlag mc = DoConstruct ) 74 72 : Init( loc, mc ), value( val ) {} 75 73 … … 90 88 91 89 ListInit( const CodeLocation & loc, std::vector<ptr<Init>> && is, 92 std::vector<ptr<Designation>> && ds = {}, ConstructFlag mc = NoConstruct );90 std::vector<ptr<Designation>> && ds = {}, ConstructFlag mc = DoConstruct ); 93 91 94 92 using iterator = std::vector<ptr<Init>>::iterator; … … 118 116 ConstructorInit( 119 117 const CodeLocation & loc, const Stmt * ctor, const Stmt * dtor, const Init * init ) 120 : Init( loc, MaybeConstruct ), ctor( ctor ), dtor( dtor ), init( init ) {}118 : Init( loc, DoConstruct ), ctor( ctor ), dtor( dtor ), init( init ) {} 121 119 122 120 const Init * accept( Visitor & v ) const override { return v.visit( this ); }
Note:
See TracChangeset
for help on using the changeset viewer.