Changeset b0440b7 for src/SynTree
- Timestamp:
- Aug 8, 2017, 8:01:10 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:
- 9a4e996
- Parents:
- 4618319
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
r4618319 rb0440b7 34 34 #include "InitTweak/InitTweak.h" 35 35 36 #include "GenPoly/Lvalue.h" 36 37 37 38 Expression::Expression( Expression *_aname ) : result( 0 ), env( 0 ), argName( _aname ) {} … … 409 410 Type * base = InitTweak::getPointerBase( type ); 410 411 assertf( base, "expected pointer type in dereference (type was %s)", toString( type ).c_str() ); 411 ret->set_result( new ReferenceType( Type::Qualifiers(), base->clone() ) ); 412 ret->set_result( base->clone() ); 413 if ( GenPoly::referencesPermissable() ) { 414 // if references are still allowed in the AST, dereference returns a reference 415 ret->set_result( new ReferenceType( Type::Qualifiers(), ret->get_result() ) ); 416 } else { 417 // references have been removed, in which case dereference returns an lvalue of the base type. 418 ret->get_result()->set_lvalue( true ); 419 } 412 420 } 413 421 return ret;
Note: See TracChangeset
for help on using the changeset viewer.