Changes in src/AST/Expr.hpp [e67991f:b8524ca]
- File:
-
- 1 edited
-
src/AST/Expr.hpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
re67991f rb8524ca 47 47 48 48 ParamEntry() : decl( 0 ), declptr( nullptr ), actualType( nullptr ), formalType( nullptr ), expr( nullptr ) {} 49 ParamEntry( 50 UniqueId id, const Decl * declptr, const Type * actual, const Type * formal, 49 ParamEntry( 50 UniqueId id, const Decl * declptr, const Type * actual, const Type * formal, 51 51 const Expr * e ) 52 52 : decl( id ), declptr( declptr ), actualType( actual ), formalType( formal ), expr( e ) {} … … 112 112 case Empty: new(&data.resnSlots) ResnSlots{}; mode = Slots; // fallthrough 113 113 case Slots: return data.resnSlots; 114 case Params: assert f(false, "Cannot return to resnSlots from Params"); abort();114 case Params: assert(!"Cannot return to resnSlots from Params"); 115 115 } 116 assertf(false, "unreachable");116 return *((ResnSlots*)nullptr); 117 117 } 118 118 … … 121 121 return data.resnSlots; 122 122 } 123 assert f(false,"Mode was not already resnSlots");124 abort();123 assert(!"Mode was not already resnSlots"); 124 return *((ResnSlots*)nullptr); 125 125 } 126 126 … … 131 131 case Params: return data.inferParams; 132 132 } 133 assertf(false, "unreachable"); 133 assert(!"unreachable"); 134 return *((InferredParams*)nullptr); 134 135 } 135 136 … … 138 139 return data.inferParams; 139 140 } 140 assert f(false,"Mode was not already Params");141 abort();141 assert(!"Mode was not already Params"); 142 return *((InferredParams*)nullptr); 142 143 } 143 144 144 145 void set_inferParams( InferredParams && ps ) { 145 146 switch(mode) { 146 case Slots: 147 case Slots: 147 148 data.resnSlots.~ResnSlots(); 148 149 // fallthrough 149 case Empty: 150 case Empty: 150 151 new(&data.inferParams) InferredParams{ std::move( ps ) }; 151 152 mode = Params; … … 171 172 data.inferParams[p.first] = std::move(p.second); 172 173 } 173 } else assert f(false,"invalid mode");174 } else assert(!"invalid mode"); 174 175 } 175 176 }; … … 383 384 384 385 ConstantExpr( 385 const CodeLocation & loc, const Type * ty, const std::string & r, 386 const CodeLocation & loc, const Type * ty, const std::string & r, 386 387 std::optional<unsigned long long> i ) 387 388 : Expr( loc, ty ), rep( r ), ival( i ) {} … … 769 770 public: 770 771 ptr<Expr> expr; 771 readonly< Decl> deleteStmt;772 773 DeletedExpr( const CodeLocation & loc, const Expr * e, const Decl* del )772 readonly<Node> deleteStmt; 773 774 DeletedExpr( const CodeLocation & loc, const Expr * e, const Node * del ) 774 775 : Expr( loc, e->result ), expr( e ), deleteStmt( del ) { assert( expr->result ); } 775 776
Note:
See TracChangeset
for help on using the changeset viewer.