Changeset 6b224a52 for src/Parser/DeclarationNode.cc
- Timestamp:
- Aug 25, 2017, 12:11:53 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:
- bf7b9da7
- Parents:
- 135b431 (diff), f676b84 (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/Parser/DeclarationNode.cc
r135b431 r6b224a52 340 340 } // DeclarationNode::newTypeDecl 341 341 342 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) {343 DeclarationNode * newnode = new DeclarationNode; 344 newnode->type = new TypeData( TypeData::Pointer);342 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers, OperKinds kind ) { 343 DeclarationNode * newnode = new DeclarationNode; 344 newnode->type = new TypeData( kind == OperKinds::PointTo ? TypeData::Pointer : TypeData::Reference ); 345 345 if ( qualifiers ) { 346 346 return newnode->addQualifiers( qualifiers ); … … 759 759 DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) { 760 760 if ( p ) { 761 assert( p->type->kind == TypeData::Pointer );761 assert( p->type->kind == TypeData::Pointer || TypeData::Reference ); 762 762 setBase( p->type ); 763 763 p->type = nullptr; … … 781 781 DeclarationNode * DeclarationNode::addNewPointer( DeclarationNode * p ) { 782 782 if ( p ) { 783 assert( p->type->kind == TypeData::Pointer );783 assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference ); 784 784 if ( type ) { 785 785 switch ( type->kind ) {
Note: See TracChangeset
for help on using the changeset viewer.