Ignore:
Timestamp:
Apr 10, 2019, 3:15:41 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
055b562
Parents:
c41c18a6
Message:

Allow merging between complete/incomplete type variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    rc41c18a6 r7a63486  
    211211                TypeDecl::Kind kind;
    212212                bool isComplete;
     213               
    213214                Data() : kind( (TypeDecl::Kind)-1 ), isComplete( false ) {}
    214215                Data( TypeDecl * typeDecl ) : Data( typeDecl->get_kind(), typeDecl->isComplete() ) {}
    215216                Data( Kind kind, bool isComplete ) : kind( kind ), isComplete( isComplete ) {}
     217                Data( const Data& d1, const Data& d2 )
     218                : kind( d1.kind ), isComplete ( d1.isComplete || d2.isComplete ) {}
     219
    216220                bool operator==(const Data & other) const { return kind == other.kind && isComplete == other.isComplete; }
    217221                bool operator!=(const Data & other) const { return !(*this == other);}
Note: See TracChangeset for help on using the changeset viewer.