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