Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.proto.h

    re67991f r37e3af4  
    118118static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {}
    119119
    120 template<typename pass_type, typename node_type>
    121 static inline auto previsit_impl( pass_type& pass, const node_type * node, __attribute__((unused)) int unused ) -> decltype( pass.previsit( node ), void() ) {
    122         pass.previsit( node );
    123 }
    124 
    125 template<typename pass_type, typename node_type>
    126 static inline void previsit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) const node_type * node, __attribute__((unused)) long unused ) {}
    127 
    128 
    129 template<typename pass_type, typename node_type>
    130 static inline auto postvisit_impl( pass_type& pass, const node_type * node, __attribute__((unused)) int unused ) -> decltype( pass.postvisit( node ), void() ) {
    131         pass.postvisit( node );
    132 }
    133 
    134 template<typename pass_type, typename node_type>
    135 static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) const node_type * node, __attribute__((unused)) long unused ) {}
    136 
    137120//---------------------------------------------------------
    138121// Mutate
     
    217200        pass.indexer.func( arg );                                                                                                \
    218201}                                                                                                                              \
    219 template<typename pass_type>                                                                                                   \
    220 static inline void indexer_impl_##func ( pass_type &, long, type ) { }
     202                                                                                                                               \
     203template<typename pass_type>                                                                                                   \
     204static inline void indexer_impl_##func ( pass_type &, long, type ) { }                                                          \
    221205
    222206#define INDEXER_FUNC2( func, type1, type2 )                                                                                             \
     
    225209        pass.indexer.func( arg1, arg2 );                                                                                                \
    226210}                                                                                                                              \
     211                                                                                                                               \
    227212template<typename pass_type>                                                                                                   \
    228213static inline void indexer_impl_##func ( pass_type &, long, type1, type2 ) { }
    229214
    230215
    231 INDEXER_FUNC1( addId     , const DeclarationWithType *       );
    232 INDEXER_FUNC1( addType   , const NamedTypeDecl *             );
    233 INDEXER_FUNC1( addStruct , const StructDecl *                );
    234 INDEXER_FUNC1( addEnum   , const EnumDecl *                  );
    235 INDEXER_FUNC1( addUnion  , const UnionDecl *                 );
    236 INDEXER_FUNC1( addTrait  , const TraitDecl *                 );
    237 INDEXER_FUNC2( addWith   , const std::list< Expression * > &, const Declaration * );
     216INDEXER_FUNC1( addId     , DeclarationWithType *       );
     217INDEXER_FUNC1( addType   , NamedTypeDecl *             );
     218INDEXER_FUNC1( addStruct , StructDecl *                );
     219INDEXER_FUNC1( addEnum   , EnumDecl *                  );
     220INDEXER_FUNC1( addUnion  , UnionDecl *                 );
     221INDEXER_FUNC1( addTrait  , TraitDecl *                 );
     222INDEXER_FUNC2( addWith   , std::list< Expression * > &, BaseSyntaxNode * );
    238223
    239224#undef INDEXER_FUNC1
     
    241226
    242227template<typename pass_type>
    243 static inline auto indexer_impl_addStructFwd( pass_type & pass, int, const StructDecl * decl ) -> decltype( pass.indexer.addStruct( decl ), void() ) {
     228static inline auto indexer_impl_addStructFwd( pass_type & pass, int, StructDecl * decl ) -> decltype( pass.indexer.addStruct( decl ), void() ) {
    244229        StructDecl * fwd = new StructDecl( decl->name );
    245230        cloneAll( decl->parameters, fwd->parameters );
     
    248233
    249234template<typename pass_type>
    250 static inline auto indexer_impl_addStructFwd( pass_type &, long, const StructDecl * ) {}
    251 
    252 template<typename pass_type>
    253 static inline auto indexer_impl_addUnionFwd( pass_type & pass, int, const UnionDecl * decl ) -> decltype( pass.indexer.addUnion( decl ), void() ) {
     235static inline auto indexer_impl_addStructFwd( pass_type &, long, StructDecl * ) {}
     236
     237template<typename pass_type>
     238static inline auto indexer_impl_addUnionFwd( pass_type & pass, int, UnionDecl * decl ) -> decltype( pass.indexer.addUnion( decl ), void() ) {
    254239        UnionDecl * fwd = new UnionDecl( decl->name );
    255240        cloneAll( decl->parameters, fwd->parameters );
     
    258243
    259244template<typename pass_type>
    260 static inline auto indexer_impl_addUnionFwd( pass_type &, long, const UnionDecl * ) {}
     245static inline auto indexer_impl_addUnionFwd( pass_type &, long, UnionDecl * ) {}
    261246
    262247template<typename pass_type>
Note: See TracChangeset for help on using the changeset viewer.