Ignore:
Timestamp:
Aug 25, 2017, 12:11:53 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r135b431 r6b224a52  
    340340} // DeclarationNode::newTypeDecl
    341341
    342 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) {
    343         DeclarationNode * newnode = new DeclarationNode;
    344         newnode->type = new TypeData( TypeData::Pointer );
     342DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers, OperKinds kind ) {
     343        DeclarationNode * newnode = new DeclarationNode;
     344        newnode->type = new TypeData( kind == OperKinds::PointTo ? TypeData::Pointer : TypeData::Reference );
    345345        if ( qualifiers ) {
    346346                return newnode->addQualifiers( qualifiers );
     
    759759DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) {
    760760        if ( p ) {
    761                 assert( p->type->kind == TypeData::Pointer );
     761                assert( p->type->kind == TypeData::Pointer || TypeData::Reference );
    762762                setBase( p->type );
    763763                p->type = nullptr;
     
    781781DeclarationNode * DeclarationNode::addNewPointer( DeclarationNode * p ) {
    782782        if ( p ) {
    783                 assert( p->type->kind == TypeData::Pointer );
     783                assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference );
    784784                if ( type ) {
    785785                        switch ( type->kind ) {
Note: See TracChangeset for help on using the changeset viewer.