Changeset 85517ddb for src/ResolvExpr
- Timestamp:
- Sep 3, 2016, 9:04:40 AM (8 years ago)
- 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:
- 1ba88a0
- Parents:
- 44f6341
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r44f6341 r85517ddb 42 42 #include "Common/utility.h" 43 43 #include "InitTweak/InitTweak.h" 44 #include "ResolveTypeof.h" 44 45 45 46 extern bool resolvep; … … 707 708 void AlternativeFinder::visit( CastExpr *castExpr ) { 708 709 for ( std::list< Type* >::iterator i = castExpr->get_results().begin(); i != castExpr->get_results().end(); ++i ) { 710 *i = resolveTypeof( *i, indexer ); 709 711 SymTab::validateType( *i, &indexer ); 710 712 adjustExprType( *i, env, indexer ); … … 795 797 796 798 void AlternativeFinder::visit( VariableExpr *variableExpr ) { 797 alternatives.push_back( Alternative( variableExpr->clone(), env, Cost::zero ) ); 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 802 } 799 803 … … 804 808 void AlternativeFinder::visit( SizeofExpr *sizeofExpr ) { 805 809 if ( sizeofExpr->get_isType() ) { 810 // xxx - resolveTypeof? 806 811 alternatives.push_back( Alternative( sizeofExpr->clone(), env, Cost::zero ) ); 807 812 } else { … … 823 828 void AlternativeFinder::visit( AlignofExpr *alignofExpr ) { 824 829 if ( alignofExpr->get_isType() ) { 830 // xxx - resolveTypeof? 825 831 alternatives.push_back( Alternative( alignofExpr->clone(), env, Cost::zero ) ); 826 832 } else { … … 856 862 void AlternativeFinder::visit( UntypedOffsetofExpr *offsetofExpr ) { 857 863 AlternativeFinder funcFinder( indexer, env ); 864 // xxx - resolveTypeof? 858 865 if ( StructInstType *structInst = dynamic_cast< StructInstType* >( offsetofExpr->get_type() ) ) { 859 866 addOffsetof( structInst, offsetofExpr->get_member() );
Note: See TracChangeset
for help on using the changeset viewer.