Changeset e6cee92 for src/ResolvExpr/AlternativeFinder.cc
- Timestamp:
- Jul 17, 2017, 3:25:58 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, 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:
- 795d450
- Parents:
- 7ebaa56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r7ebaa56 re6cee92 815 815 816 816 Expression * restructureCast( Expression * argExpr, Type * toType ) { 817 if ( argExpr->get_result()->size() > 1 && ! toType->isVoid() ) { 818 // Argument expression is a tuple and the target type is not void. Cast each member of the tuple 819 // to its corresponding target type, producing the tuple of those cast expressions. If there are 820 // more components of the tuple than components in the target type, then excess components do not 821 // come out in the result expression (but UniqueExprs ensure that side effects will still be done). 817 if ( argExpr->get_result()->size() > 1 && ! toType->isVoid() && ! dynamic_cast<ReferenceType *>( toType ) ) { 818 // Argument expression is a tuple and the target type is not void and not a reference type. 819 // Cast each member of the tuple to its corresponding target type, producing the tuple of those 820 // cast expressions. If there are more components of the tuple than components in the target type, 821 // then excess components do not come out in the result expression (but UniqueExprs ensure that 822 // side effects will still be done). 822 823 if ( Tuples::maybeImpure( argExpr ) && ! dynamic_cast< UniqueExpr * >( argExpr ) ) { 823 824 // expressions which may contain side effects require a single unique instance of the expression.
Note: See TracChangeset
for help on using the changeset viewer.