- Timestamp:
- Nov 10, 2020, 12:20:37 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 18f0b70
- Parents:
- 3febb2d
- Location:
- src/AST
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r3febb2d r16ba4a6 2764 2764 old->location, 2765 2765 GET_ACCEPT_1(value, Expr), 2766 (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast:: DoConstruct2766 (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast::NoConstruct 2767 2767 ); 2768 2768 } … … 2773 2773 GET_ACCEPT_V(initializers, Init), 2774 2774 GET_ACCEPT_V(designations, Designation), 2775 (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast:: DoConstruct2775 (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast::NoConstruct 2776 2776 ); 2777 2777 } -
src/AST/Decl.hpp
r3febb2d r16ba4a6 79 79 ptr<Expr> asmName; 80 80 bool isDeleted = false; 81 bool isTypeFixed = false; 81 82 82 83 DeclWithType( const CodeLocation& loc, const std::string& name, Storage::Classes storage, -
src/AST/Init.hpp
r3febb2d r16ba4a6 50 50 51 51 /// Flag for whether to construct from initialzier 52 enum ConstructFlag { DoConstruct, MaybeConstruct };52 enum ConstructFlag { NoConstruct, MaybeConstruct }; 53 53 54 54 /// Object initializer base class … … 71 71 ptr<Expr> value; 72 72 73 SingleInit( const CodeLocation & loc, const Expr * val, ConstructFlag mc = DoConstruct )73 SingleInit( const CodeLocation & loc, const Expr * val, ConstructFlag mc = NoConstruct ) 74 74 : Init( loc, mc ), value( val ) {} 75 75 … … 90 90 91 91 ListInit( const CodeLocation & loc, std::vector<ptr<Init>> && is, 92 std::vector<ptr<Designation>> && ds = {}, ConstructFlag mc = DoConstruct );92 std::vector<ptr<Designation>> && ds = {}, ConstructFlag mc = NoConstruct ); 93 93 94 94 using iterator = std::vector<ptr<Init>>::iterator; … … 118 118 ConstructorInit( 119 119 const CodeLocation & loc, const Stmt * ctor, const Stmt * dtor, const Init * init ) 120 : Init( loc, DoConstruct ), ctor( ctor ), dtor( dtor ), init( init ) {}120 : Init( loc, MaybeConstruct ), ctor( ctor ), dtor( dtor ), init( init ) {} 121 121 122 122 const Init * accept( Visitor & v ) const override { return v.visit( this ); } -
src/AST/Pass.impl.hpp
r3febb2d r16ba4a6 683 683 // Do not enter (or leave) a new scope if atFunctionTop. Remember to save the result. 684 684 auto guard1 = makeFuncGuard( [this, enterScope = !this->atFunctionTop]() { 685 if ( enterScope ) __pass::symtab::enter(core, 0); 685 if ( enterScope ) { 686 __pass::symtab::enter(core, 0); 687 __pass::scope::enter(core, 0); 688 } 686 689 }, [this, leaveScope = !this->atFunctionTop]() { 687 if ( leaveScope ) __pass::symtab::leave(core, 0); 690 if ( leaveScope ) { 691 __pass::symtab::leave(core, 0); 692 __pass::scope::leave(core, 0); 693 } 688 694 }); 689 695 ValueGuard< bool > guard2( atFunctionTop ); -
src/AST/Type.cpp
r3febb2d r16ba4a6 211 211 for ( const Type * ty : types ) { 212 212 members.emplace_back( new ObjectDecl{ 213 CodeLocation{}, "", ty, new ListInit( CodeLocation{}, {}, {}, MaybeConstruct ),213 CodeLocation{}, "", ty, new ListInit( CodeLocation{}, {}, {}, NoConstruct ), 214 214 Storage::Classes{}, Linkage::Cforall } ); 215 215 }
Note: See TracChangeset
for help on using the changeset viewer.