Ignore:
Timestamp:
Aug 19, 2015, 3:59:45 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
830c21a
Parents:
18997b9 (diff), 4aa0858 (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.
Message:

Merge branch 'override-autogen' into ctor

Conflicts:

src/Parser/ParseNode.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r18997b9 r353d168  
    1010// Created On       : Sun May 17 21:50:04 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jul 22 13:16:00 2015
    13 // Update Count     : 194
     12// Last Modified On : Wed Aug 05 14:00:24 2015
     13// Update Count     : 195
    1414//
    1515
     
    162162        class EliminateTypedef : public Mutator {
    163163          public:
    164                 EliminateTypedef() : scopeLevel( 0 ) {}
     164          EliminateTypedef() : scopeLevel( 0 ) {}
     165            /// Replaces typedefs by forward declarations
    165166                static void eliminateTypedef( std::list< Declaration * > &translationUnit );
    166167          private:
     
    542543                std::list<Statement *> initList;
    543544                initList.push_back( initStmt );
    544 
     545 
    545546                UntypedExpr *cond = new UntypedExpr( new NameExpr( "?<?" ) );
    546547                cond->get_args().push_back( new VariableExpr( index ) );
     
    617618
    618619                // need to remove the prototypes, since this may be nested in a routine
    619                 for ( int start = 0, end = assigns.size() / 2; start < end; start++ ) {
     620                for (int start = 0, end = assigns.size()/2; start < end; start++) {
    620621                        delete assigns.front();
    621622                        assigns.pop_front();
     
    892893                TypedefMap oldNames = typedefNames;
    893894                DeclarationWithType *ret = Mutator::mutate( objDecl );
     895                typedefNames = oldNames;
    894896                if ( FunctionType *funtype = dynamic_cast<FunctionType *>( ret->get_type() ) ) {
    895897                        return new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn() );
     
    897899                        throw SemanticError( "invalid inline or _Noreturn specification in declaration of ", objDecl );
    898900                } // if
    899                 typedefNames = oldNames;
    900901                return ret;
    901902        }
     
    960961        }
    961962
    962         Declaration *EliminateTypedef::mutate( ContextDecl * contextDecl ) {
     963                Declaration *EliminateTypedef::mutate( ContextDecl * contextDecl ) {
    963964                Mutator::mutate( contextDecl );
    964965                return handleAggregate( contextDecl );
Note: See TracChangeset for help on using the changeset viewer.