Changeset 87701b6 for src/AST/Decl.hpp
- Timestamp:
- May 16, 2019, 4:13:19 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:
- e61207e7
- Parents:
- 1fb7bfd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
r1fb7bfd r87701b6 111 111 /// Must be copied in ALL derived classes 112 112 template<typename node_t> 113 friend automutate(const node_t * node);113 friend node_t * mutate(const node_t * node); 114 114 }; 115 115 … … 138 138 /// Must be copied in ALL derived classes 139 139 template<typename node_t> 140 friend automutate(const node_t * node);140 friend node_t * mutate(const node_t * node); 141 141 }; 142 142 … … 201 201 /// Must be copied in ALL derived classes 202 202 template<typename node_t> 203 friend automutate(const node_t * node);203 friend node_t * mutate(const node_t * node); 204 204 }; 205 205 … … 219 219 /// Must be copied in ALL derived classes 220 220 template<typename node_t> 221 friend automutate(const node_t * node);221 friend node_t * mutate(const node_t * node); 222 222 }; 223 223 … … 263 263 /// Must be copied in ALL derived classes 264 264 template<typename node_t> 265 friend automutate(const node_t * node);265 friend node_t * mutate(const node_t * node); 266 266 267 267 std::string typeString() const override { return "struct"; } … … 281 281 /// Must be copied in ALL derived classes 282 282 template<typename node_t> 283 friend automutate(const node_t * node);283 friend node_t * mutate(const node_t * node); 284 284 285 285 std::string typeString() const override { return "union"; } … … 302 302 /// Must be copied in ALL derived classes 303 303 template<typename node_t> 304 friend automutate(const node_t * node);304 friend node_t * mutate(const node_t * node); 305 305 306 306 std::string typeString() const override { return "enum"; } … … 323 323 /// Must be copied in ALL derived classes 324 324 template<typename node_t> 325 friend automutate(const node_t * node);325 friend node_t * mutate(const node_t * node); 326 326 327 327 std::string typeString() const override { return "trait"; } … … 341 341 /// Must be copied in ALL derived classes 342 342 template<typename node_t> 343 friend automutate(const node_t * node);343 friend node_t * mutate(const node_t * node); 344 344 }; 345 345 … … 358 358 /// Must be copied in ALL derived classes 359 359 template<typename node_t> 360 friend auto mutate(const node_t * node); 361 }; 362 363 //================================================================================================= 364 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency 365 /// remove only if there is a better solution 366 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with 367 /// forward declarations 368 inline void increment( const class Decl * node, Node::ref_type ref ) { node->increment(ref); } 369 inline void decrement( const class Decl * node, Node::ref_type ref ) { node->decrement(ref); } 370 inline void increment( const class DeclWithType * node, Node::ref_type ref ) { node->increment(ref); } 371 inline void decrement( const class DeclWithType * node, Node::ref_type ref ) { node->decrement(ref); } 372 inline void increment( const class ObjectDecl * node, Node::ref_type ref ) { node->increment(ref); } 373 inline void decrement( const class ObjectDecl * node, Node::ref_type ref ) { node->decrement(ref); } 374 inline void increment( const class FunctionDecl * node, Node::ref_type ref ) { node->increment(ref); } 375 inline void decrement( const class FunctionDecl * node, Node::ref_type ref ) { node->decrement(ref); } 376 inline void increment( const class AggregateDecl * node, Node::ref_type ref ) { node->increment(ref); } 377 inline void decrement( const class AggregateDecl * node, Node::ref_type ref ) { node->decrement(ref); } 378 inline void increment( const class StructDecl * node, Node::ref_type ref ) { node->increment(ref); } 379 inline void decrement( const class StructDecl * node, Node::ref_type ref ) { node->decrement(ref); } 380 inline void increment( const class UnionDecl * node, Node::ref_type ref ) { node->increment(ref); } 381 inline void decrement( const class UnionDecl * node, Node::ref_type ref ) { node->decrement(ref); } 382 inline void increment( const class EnumDecl * node, Node::ref_type ref ) { node->increment(ref); } 383 inline void decrement( const class EnumDecl * node, Node::ref_type ref ) { node->decrement(ref); } 384 inline void increment( const class TraitDecl * node, Node::ref_type ref ) { node->increment(ref); } 385 inline void decrement( const class TraitDecl * node, Node::ref_type ref ) { node->decrement(ref); } 386 inline void increment( const class NamedTypeDecl * node, Node::ref_type ref ) { node->increment(ref); } 387 inline void decrement( const class NamedTypeDecl * node, Node::ref_type ref ) { node->decrement(ref); } 388 inline void increment( const class TypeDecl * node, Node::ref_type ref ) { node->increment(ref); } 389 inline void decrement( const class TypeDecl * node, Node::ref_type ref ) { node->decrement(ref); } 390 inline void increment( const class TypedefDecl * node, Node::ref_type ref ) { node->increment(ref); } 391 inline void decrement( const class TypedefDecl * node, Node::ref_type ref ) { node->decrement(ref); } 392 inline void increment( const class AsmDecl * node, Node::ref_type ref ) { node->increment(ref); } 393 inline void decrement( const class AsmDecl * node, Node::ref_type ref ) { node->decrement(ref); } 394 inline void increment( const class StaticAssertDecl * node, Node::ref_type ref ) { node->increment(ref); } 395 inline void decrement( const class StaticAssertDecl * node, Node::ref_type ref ) { node->decrement(ref); } 360 friend node_t * mutate(const node_t * node); 361 }; 396 362 397 363 }
Note: See TracChangeset
for help on using the changeset viewer.