Changeset 79970ed for src/ResolvExpr


Ignore:
Timestamp:
Aug 24, 2016, 12:36:33 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, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0555f4b
Parents:
f87408e
Message:

implement warnings for missing struct member constructor calls, remove bad clones

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/ResolvExpr/AlternativeFinder.cc

    rf87408e r79970ed  
    244244                for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
    245245                        if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( *i ) ) {
    246                                 alternatives.push_back( Alternative( new MemberExpr( dwt->clone(), expr->clone() ), env, newCost ) );
     246                                alternatives.push_back( Alternative( new MemberExpr( dwt, expr->clone() ), env, newCost ) );
    247247                                renameTypes( alternatives.back().expr );
    248248                        } else {
     
    418418        // /// Map of declaration uniqueIds (intended to be the assertions in an AssertionSet) to their parents and the number of times they've been included
    419419        //typedef std::unordered_map< UniqueId, std::unordered_map< UniqueId, unsigned > > AssertionParentSet;
    420        
     420
    421421        static const int recursionLimit = /*10*/ 4;  ///< Limit to depth of recursion satisfaction
    422422        //static const unsigned recursionParentLimit = 1;  ///< Limit to the number of times an assertion can recursively use itself
     
    429429                }
    430430        }
    431        
     431
    432432        template< typename ForwardIterator, typename OutputIterator >
    433         void inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, /*const AssertionParentSet &needParents,*/ 
     433        void inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, /*const AssertionParentSet &needParents,*/
    434434                                                 int level, const SymTab::Indexer &indexer, OutputIterator out ) {
    435435                if ( begin == end ) {
     
    469469                                std::cerr << std::endl;
    470470                        )
    471                        
     471
    472472                        AssertionSet newHave, newerNeed( newNeed );
    473473                        TypeEnvironment newEnv( newAlt.env );
     
    847847                for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
    848848                        if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( *i ) ) {
    849                                 alternatives.push_back( Alternative( new OffsetofExpr( aggInst->clone(), dwt->clone() ), env, Cost::zero ) );
     849                                alternatives.push_back( Alternative( new OffsetofExpr( aggInst->clone(), dwt ), env, Cost::zero ) );
    850850                                renameTypes( alternatives.back().expr );
    851851                        } else {
Note: See TracChangeset for help on using the changeset viewer.