- File:
-
- 1 edited
-
src/ResolvExpr/AlternativeFinder.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r85517ddb r79970ed 38 38 #include "SynTree/TypeSubstitution.h" 39 39 #include "SymTab/Validate.h" 40 #include "Designators/Processor.h" 40 41 #include "Tuples/TupleAssignment.h" 41 42 #include "Tuples/NameMatcher.h" 42 43 #include "Common/utility.h" 43 44 #include "InitTweak/InitTweak.h" 44 #include "ResolveTypeof.h"45 45 46 46 extern bool resolvep; … … 708 708 void AlternativeFinder::visit( CastExpr *castExpr ) { 709 709 for ( std::list< Type* >::iterator i = castExpr->get_results().begin(); i != castExpr->get_results().end(); ++i ) { 710 *i = resolveTypeof( *i, indexer );711 710 SymTab::validateType( *i, &indexer ); 712 711 adjustExprType( *i, env, indexer ); … … 797 796 798 797 void AlternativeFinder::visit( VariableExpr *variableExpr ) { 799 // not sufficient to clone here, because variable's type may have changed 800 // since the VariableExpr was originally created. 801 alternatives.push_back( Alternative( new VariableExpr( variableExpr->get_var() ), env, Cost::zero ) ); 798 alternatives.push_back( Alternative( variableExpr->clone(), env, Cost::zero ) ); 802 799 } 803 800 … … 808 805 void AlternativeFinder::visit( SizeofExpr *sizeofExpr ) { 809 806 if ( sizeofExpr->get_isType() ) { 810 // xxx - resolveTypeof?811 807 alternatives.push_back( Alternative( sizeofExpr->clone(), env, Cost::zero ) ); 812 808 } else { … … 828 824 void AlternativeFinder::visit( AlignofExpr *alignofExpr ) { 829 825 if ( alignofExpr->get_isType() ) { 830 // xxx - resolveTypeof?831 826 alternatives.push_back( Alternative( alignofExpr->clone(), env, Cost::zero ) ); 832 827 } else { … … 862 857 void AlternativeFinder::visit( UntypedOffsetofExpr *offsetofExpr ) { 863 858 AlternativeFinder funcFinder( indexer, env ); 864 // xxx - resolveTypeof?865 859 if ( StructInstType *structInst = dynamic_cast< StructInstType* >( offsetofExpr->get_type() ) ) { 866 860 addOffsetof( structInst, offsetofExpr->get_member() );
Note:
See TracChangeset
for help on using the changeset viewer.