Changeset bdd516a for translator/SynTree/Type.h
- Timestamp:
- Apr 28, 2015, 4:21:36 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 42e2ad7
- Parents:
- ad17ba6a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/SynTree/Type.h
rad17ba6a rbdd516a 10 10 public: 11 11 struct Qualifiers { 12 Qualifiers(): isConst( false ), isVolatile( false ), isRestrict( false ), isLvalue( false ) {}13 Qualifiers( bool isConst, bool isVolatile, bool isRestrict, bool isLvalue ): isConst( isConst ), isVolatile( isVolatile ), isRestrict( isRestrict ), isLvalue( isLvalue) {}12 Qualifiers(): isConst( false ), isVolatile( false ), isRestrict( false ), isLvalue( false ), isAtomic( false ) {} 13 Qualifiers( bool isConst, bool isVolatile, bool isRestrict, bool isLvalue, bool isAtomic ): isConst( isConst ), isVolatile( isVolatile ), isRestrict( isRestrict ), isLvalue( isLvalue ), isAtomic( isAtomic ) {} 14 14 15 15 Qualifiers &operator+=( const Qualifiers &other ); … … 27 27 bool isRestrict; 28 28 bool isLvalue; 29 bool isAtomic; 29 30 }; 30 31 … … 38 39 bool get_isRestrict() { return tq.isRestrict; } 39 40 bool get_isLvalue() { return tq.isLvalue; } 41 bool get_isAtomic() { return tq.isAtomic; } 40 42 void set_isConst( bool newValue ) { tq.isConst = newValue; } 41 43 void set_iisVolatile( bool newValue ) { tq.isVolatile = newValue; } 42 44 void set_isRestrict( bool newValue ) { tq.isRestrict = newValue; } 43 45 void set_isLvalue( bool newValue ) { tq.isLvalue = newValue; } 46 void set_isAtomic( bool newValue ) { tq.isAtomic = newValue; } 44 47 std::list<TypeDecl*>& get_forall() { return forall; } 45 48 … … 380 383 isRestrict |= other.isRestrict; 381 384 isLvalue |= other.isLvalue; 385 isAtomic |= other.isAtomic; 382 386 return *this; 383 387 } … … 387 391 if ( other.isVolatile ) isVolatile = 0; 388 392 if ( other.isRestrict ) isRestrict = 0; 393 if ( other.isAtomic ) isAtomic = 0; 389 394 return *this; 390 395 } … … 398 403 inline bool Type::Qualifiers::operator==( const Qualifiers &other ) { 399 404 return isConst == other.isConst 400 && isVolatile == other.isVolatile 401 && isRestrict == other.isRestrict; 402 /// && isLvalue == other.isLvalue; 405 && isVolatile == other.isVolatile 406 && isRestrict == other.isRestrict 407 // && isLvalue == other.isLvalue 408 && isAtomic == other.isAtomic; 403 409 } 404 410 … … 406 412 return isConst != other.isConst 407 413 || isVolatile != other.isVolatile 408 || isRestrict != other.isRestrict; 409 /// && isLvalue == other.isLvalue; 414 || isRestrict != other.isRestrict 415 // || isLvalue != other.isLvalue 416 || isAtomic != other.isAtomic; 410 417 } 411 418 … … 413 420 return isConst <= other.isConst 414 421 && isVolatile <= other.isVolatile 415 && isRestrict <= other.isRestrict; 416 /// && isLvalue >= other.isLvalue; 422 && isRestrict <= other.isRestrict 423 // && isLvalue >= other.isLvalue 424 && isAtomic == other.isAtomic; 417 425 } 418 426 … … 420 428 return isConst >= other.isConst 421 429 && isVolatile >= other.isVolatile 422 && isRestrict >= other.isRestrict; 423 /// && isLvalue <= other.isLvalue; 430 && isRestrict >= other.isRestrict 431 // && isLvalue <= other.isLvalue 432 && isAtomic == other.isAtomic; 424 433 } 425 434
Note: See TracChangeset
for help on using the changeset viewer.