Changes in src/AST/Expr.hpp [7870799:b8524ca]
- File:
-
- 1 edited
-
src/AST/Expr.hpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
r7870799 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 return *((ResnSlots*)nullptr); 116 117 } 117 118 … … 120 121 return data.resnSlots; 121 122 } 122 assert f(false,"Mode was not already resnSlots");123 abort();123 assert(!"Mode was not already resnSlots"); 124 return *((ResnSlots*)nullptr); 124 125 } 125 126 … … 130 131 case Params: return data.inferParams; 131 132 } 132 assertf(false, "unreachable"); 133 assert(!"unreachable"); 134 return *((InferredParams*)nullptr); 133 135 } 134 136 … … 137 139 return data.inferParams; 138 140 } 139 assert f(false,"Mode was not already Params");140 abort();141 assert(!"Mode was not already Params"); 142 return *((InferredParams*)nullptr); 141 143 } 142 144 143 145 void set_inferParams( InferredParams && ps ) { 144 146 switch(mode) { 145 case Slots: 147 case Slots: 146 148 data.resnSlots.~ResnSlots(); 147 149 // fallthrough 148 case Empty: 150 case Empty: 149 151 new(&data.inferParams) InferredParams{ std::move( ps ) }; 150 152 mode = Params; … … 170 172 data.inferParams[p.first] = std::move(p.second); 171 173 } 172 } else assert f(false,"invalid mode");174 } else assert(!"invalid mode"); 173 175 } 174 176 }; … … 382 384 383 385 ConstantExpr( 384 const CodeLocation & loc, const Type * ty, const std::string & r, 386 const CodeLocation & loc, const Type * ty, const std::string & r, 385 387 std::optional<unsigned long long> i ) 386 388 : Expr( loc, ty ), rep( r ), ival( i ) {}
Note:
See TracChangeset
for help on using the changeset viewer.