Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.hpp

    re0115286 r360b2e13  
    122122        std::vector<ptr<DeclWithType>> assertions;
    123123
    124         NamedTypeDecl( const CodeLocation& loc, const std::string& name, Storage::Classes storage,
     124        NamedTypeDecl( const CodeLocation& loc, const std::string& name, Storage::Classes storage, 
    125125                Type* b, Linkage::Spec spec = Linkage::Cforall )
    126126        : Decl( loc, name, storage, spec ), base( b ), parameters(), assertions() {}
     
    149149                Data( TypeDecl* d ) : kind( d->kind ), isComplete( d->sized ) {}
    150150                Data( Kind k, bool c ) : kind( k ), isComplete( c ) {}
    151                 Data( const Data& d1, const Data& d2 )
     151                Data( const Data& d1, const Data& d2 ) 
    152152                : kind( d1.kind ), isComplete( d1.isComplete || d2.isComplete ) {}
    153153
     
    158158        };
    159159
    160         TypeDecl( const CodeLocation& loc, const std::string& name, Storage::Classes storage, Type* b,
     160        TypeDecl( const CodeLocation& loc, const std::string& name, Storage::Classes storage, Type* b, 
    161161                Kind k, bool s, Type* i = nullptr )
    162162        : NamedTypeDecl( loc, name, storage, b ), kind( k ), sized( k == Ttype || s ), init( i ) {}
     
    174174class TypedefDecl final : public NamedTypeDecl {
    175175public:
    176         TypedefDecl( const CodeLocation& loc, const std::string& name, Storage::Classes storage,
     176        TypedefDecl( const CodeLocation& loc, const std::string& name, Storage::Classes storage, 
    177177                Type* b, Linkage::Spec spec = Linkage::Cforall )
    178178        : NamedTypeDecl( loc, name, storage, b, spec ) {}
     
    275275};
    276276
    277 
    278 //=================================================================================================
    279 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency
    280 /// remove only if there is a better solution
    281 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with
    282 /// forward declarations
    283 inline void increment( const class Decl * node, Node::ref_type ref ) { node->increment(ref); }
    284 inline void decrement( const class Decl * node, Node::ref_type ref ) { node->decrement(ref); }
    285 inline void increment( const class DeclWithType * node, Node::ref_type ref ) { node->increment(ref); }
    286 inline void decrement( const class DeclWithType * node, Node::ref_type ref ) { node->decrement(ref); }
    287 inline void increment( const class ObjectDecl * node, Node::ref_type ref ) { node->increment(ref); }
    288 inline void decrement( const class ObjectDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    289 inline void increment( const class FunctionDecl * node, Node::ref_type ref ) { node->increment(ref); }
    290 inline void decrement( const class FunctionDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    291 inline void increment( const class AggregateDecl * node, Node::ref_type ref ) { node->increment(ref); }
    292 inline void decrement( const class AggregateDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    293 inline void increment( const class StructDecl * node, Node::ref_type ref ) { node->increment(ref); }
    294 inline void decrement( const class StructDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    295 inline void increment( const class UnionDecl * node, Node::ref_type ref ) { node->increment(ref); }
    296 inline void decrement( const class UnionDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    297 inline void increment( const class EnumDecl * node, Node::ref_type ref ) { node->increment(ref); }
    298 inline void decrement( const class EnumDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    299 inline void increment( const class TraitDecl * node, Node::ref_type ref ) { node->increment(ref); }
    300 inline void decrement( const class TraitDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    301 inline void increment( const class NamedTypeDecl * node, Node::ref_type ref ) { node->increment(ref); }
    302 inline void decrement( const class NamedTypeDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    303 inline void increment( const class TypeDecl * node, Node::ref_type ref ) { node->increment(ref); }
    304 inline void decrement( const class TypeDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    305 inline void increment( const class FtypeDecl * node, Node::ref_type ref ) { node->increment(ref); }
    306 inline void decrement( const class FtypeDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    307 inline void increment( const class DtypeDecl * node, Node::ref_type ref ) { node->increment(ref); }
    308 inline void decrement( const class DtypeDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    309 inline void increment( const class TypedefDecl * node, Node::ref_type ref ) { node->increment(ref); }
    310 inline void decrement( const class TypedefDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    311 inline void increment( const class AsmDecl * node, Node::ref_type ref ) { node->increment(ref); }
    312 inline void decrement( const class AsmDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    313 inline void increment( const class StaticAssertDecl * node, Node::ref_type ref ) { node->increment(ref); }
    314 inline void decrement( const class StaticAssertDecl * node, Node::ref_type ref ) { node->decrement(ref); }
    315 
    316277}
    317278
Note: See TracChangeset for help on using the changeset viewer.