Changeset 37e3af4 for src


Ignore:
Timestamp:
May 10, 2019, 2:48:09 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
1f93c2c
Parents:
04124c4
Message:

Check that no-one returns null from mutate and prevent macro from leaking

Location:
src/Common
Files:
2 edited

Legend:

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

    r04124c4 r37e3af4  
    168168template< typename Container, typename pass_type >
    169169inline void maybeMutate_impl( Container & container, PassVisitor< pass_type > & mutator ) {
     170
    170171        if ( ! mutator.get_visit_children() ) return;
    171172        SemanticErrorException errors;
     
    217218                try {
    218219                        func( *i );
     220                        assert( *i );
    219221                        assert(( empty( beforeStmts ) && empty( afterStmts ))
    220222                            || ( empty( beforeDecls ) && empty( afterDecls )) );
  • src/Common/PassVisitor.proto.h

    r04124c4 r37e3af4  
    222222INDEXER_FUNC2( addWith   , std::list< Expression * > &, BaseSyntaxNode * );
    223223
     224#undef INDEXER_FUNC1
     225#undef INDEXER_FUNC2
    224226
    225227template<typename pass_type>
Note: See TracChangeset for help on using the changeset viewer.