Changeset c366ec6 for src/Tuples/Explode.h
- Timestamp:
- Oct 10, 2017, 4:29:47 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:
- d2e2865
- Parents:
- 08da53d (diff), c386bc1 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Explode.h
r08da53d rc366ec6 30 30 Expression * distributeReference( Expression * ); 31 31 32 static inline CastExpr * isReferenceCast( Expression * expr ) { 33 if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) { 34 if ( dynamic_cast< ReferenceType * >( castExpr->result ) ) { 35 return castExpr; 36 } 37 } 38 return nullptr; 39 } 40 32 41 /// helper function used by explode 33 42 template< typename OutputIterator > … … 35 44 if ( isTupleAssign ) { 36 45 // tuple assignment needs CastExprs to be recursively exploded to easily get at all of the components 37 if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {46 if ( CastExpr * castExpr = isReferenceCast( expr ) ) { 38 47 ResolvExpr::AltList alts; 39 48 explodeUnique( castExpr->get_arg(), alt, indexer, back_inserter( alts ), isTupleAssign );
Note: See TracChangeset
for help on using the changeset viewer.