Changeset 168c007 for src/SynTree
- Timestamp:
- Mar 21, 2017, 12:50:27 PM (8 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:
- da6d4566, f5392c1
- Parents:
- 94a8123 (diff), e04b636 (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. - Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r94a8123 r168c007 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 08:34:11201713 // Update Count : 1 1812 // Last Modified On : Fri Mar 17 16:05:08 2017 13 // Update Count : 121 14 14 // 15 15 … … 255 255 typedef AggregateDecl Parent; 256 256 public: 257 StructDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes) {}257 StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ), kind( kind ) {} 258 258 StructDecl( const StructDecl &other ) : Parent( other ) {} 259 259 260 bool is_coroutine() { return kind == DeclarationNode::Coroutine; } 261 bool is_monitor() { return kind == DeclarationNode::Monitor; } 262 bool is_thread() { return kind == DeclarationNode::Thread; } 263 260 264 virtual StructDecl *clone() const { return new StructDecl( *this ); } 261 265 virtual void accept( Visitor &v ) { v.visit( this ); } 262 266 virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); } 263 267 private: 268 DeclarationNode::Aggregate kind; 264 269 virtual std::string typeString() const; 265 270 }; -
src/SynTree/Type.h
r94a8123 r168c007 117 117 bool operator!=( Qualifiers other ) const { return (val & Mask) != (other.val & Mask); } 118 118 bool operator<=( Qualifiers other ) const { 119 return is_const <= other.is_const && is_volatile <= other.is_volatile && 120 is_mutex >= other.is_mutex && is_atomic == other.is_atomic; 119 return is_const <= other.is_const //Any non-const converts to const without cost 120 && is_volatile <= other.is_volatile //Any non-volatile converts to volatile without cost 121 && is_mutex >= other.is_mutex //Any mutex converts to non-mutex without cost 122 && is_atomic == other.is_atomic; //No conversion from atomic to non atomic is free 121 123 } 122 124 bool operator<( Qualifiers other ) const { return *this != other && *this <= other; }
Note: See TracChangeset
for help on using the changeset viewer.