Changeset 41b24c8 for src/AST/Expr.hpp
- Timestamp:
- May 16, 2019, 4:23:47 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- acd80b4
- Parents:
- e61207e7 (diff), c671112 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
re61207e7 r41b24c8 27 27 #include "Visitor.hpp" 28 28 29 // Must be included in *all* AST classes; should be #undef'd at the end of the file 30 #define MUTATE_FRIEND template<typename node_t> friend auto mutate(const node_t * node); 31 29 32 namespace ast { 30 33 … … 127 130 private: 128 131 Expr * clone() const override = 0; 132 MUTATE_FRIEND 129 133 }; 130 134 … … 141 145 private: 142 146 ApplicationExpr * clone() const override { return new ApplicationExpr{ *this }; } 147 MUTATE_FRIEND 143 148 }; 144 149 … … 160 165 private: 161 166 UntypedExpr * clone() const override { return new UntypedExpr{ *this }; } 167 MUTATE_FRIEND 162 168 }; 163 169 … … 173 179 private: 174 180 NameExpr * clone() const override { return new NameExpr{ *this }; } 181 MUTATE_FRIEND 175 182 }; 176 183 … … 185 192 private: 186 193 AddressExpr * clone() const override { return new AddressExpr{ *this }; } 194 MUTATE_FRIEND 187 195 }; 188 196 … … 198 206 private: 199 207 LabelAddressExpr * clone() const override { return new LabelAddressExpr{ *this }; } 208 MUTATE_FRIEND 200 209 }; 201 210 … … 217 226 private: 218 227 CastExpr * clone() const override { return new CastExpr{ *this }; } 228 MUTATE_FRIEND 219 229 }; 220 230 … … 234 244 private: 235 245 KeywordCastExpr * clone() const override { return new KeywordCastExpr{ *this }; } 246 MUTATE_FRIEND 236 247 }; 237 248 … … 247 258 private: 248 259 VirtualCastExpr * clone() const override { return new VirtualCastExpr{ *this }; } 260 MUTATE_FRIEND 249 261 }; 250 262 … … 261 273 private: 262 274 UntypedMemberExpr * clone() const override { return new UntypedMemberExpr{ *this }; } 275 MUTATE_FRIEND 263 276 }; 264 277 … … 274 287 private: 275 288 MemberExpr * clone() const override { return new MemberExpr{ *this }; } 289 MUTATE_FRIEND 276 290 }; 277 291 … … 289 303 private: 290 304 VariableExpr * clone() const override { return new VariableExpr{ *this }; } 305 MUTATE_FRIEND 291 306 }; 292 307 … … 332 347 private: 333 348 ConstantExpr * clone() const override { return new ConstantExpr{ *this }; } 349 MUTATE_FRIEND 334 350 }; 335 351 … … 347 363 private: 348 364 SizeofExpr * clone() const override { return new SizeofExpr{ *this }; } 365 MUTATE_FRIEND 349 366 }; 350 367 … … 362 379 private: 363 380 AlignofExpr * clone() const override { return new AlignofExpr{ *this }; } 381 MUTATE_FRIEND 364 382 }; 365 383 … … 376 394 private: 377 395 UntypedOffsetofExpr * clone() const override { return new UntypedOffsetofExpr{ *this }; } 396 MUTATE_FRIEND 378 397 }; 379 398 … … 389 408 private: 390 409 OffsetofExpr * clone() const override { return new OffsetofExpr{ *this }; } 410 MUTATE_FRIEND 391 411 }; 392 412 … … 401 421 private: 402 422 OffsetPackExpr * clone() const override { return new OffsetPackExpr{ *this }; } 423 MUTATE_FRIEND 403 424 }; 404 425 … … 418 439 private: 419 440 LogicalExpr * clone() const override { return new LogicalExpr{ *this }; } 441 MUTATE_FRIEND 420 442 }; 421 443 … … 433 455 private: 434 456 ConditionalExpr * clone() const override { return new ConditionalExpr{ *this }; } 457 MUTATE_FRIEND 435 458 }; 436 459 … … 447 470 private: 448 471 CommaExpr * clone() const override { return new CommaExpr{ *this }; } 472 MUTATE_FRIEND 449 473 }; 450 474 … … 459 483 private: 460 484 TypeExpr * clone() const override { return new TypeExpr{ *this }; } 485 MUTATE_FRIEND 461 486 }; 462 487 … … 470 495 471 496 } 497 498 #undef MUTATE_FRIEND 472 499 473 500 // Local Variables: //
Note: See TracChangeset
for help on using the changeset viewer.