Changeset 90152a4 for src/SynTree/Type.h
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- 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:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (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/SynTree/Type.h
rf9feab8 r90152a4 178 178 virtual bool isComplete() const { return true; } 179 179 180 virtual AggregateDecl * getAggr() { assertf( false, "Non-aggregate type: %s", toString( this ).c_str() ); } 180 virtual AggregateDecl * getAggr() const { assertf( false, "Non-aggregate type: %s", toCString( this ) ); } 181 182 virtual TypeSubstitution genericSubstitution() const; 181 183 182 184 virtual Type *clone() const = 0; … … 229 231 SignedInt128, 230 232 UnsignedInt128, 233 Float80, 234 Float128, 231 235 NUMBER_OF_BASIC_TYPES 232 236 } kind; … … 311 315 }; 312 316 317 class QualifiedType : public Type { 318 public: 319 Type * parent; 320 Type * child; 321 322 QualifiedType( const Type::Qualifiers & tq, Type * parent, Type * child ); 323 QualifiedType( const QualifiedType & tq ); 324 virtual ~QualifiedType(); 325 326 virtual QualifiedType *clone() const override { return new QualifiedType( *this ); } 327 virtual void accept( Visitor & v ) override { v.visit( this ); } 328 virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); } 329 virtual void print( std::ostream & os, Indenter indent = {} ) const override; 330 }; 331 313 332 class ReferenceType : public Type { 314 333 public: … … 328 347 // the number of values are disallowed. 329 348 virtual unsigned size() const override { return base->size(); } 349 350 virtual TypeSubstitution genericSubstitution() const override; 330 351 331 352 virtual ReferenceType *clone() const override { return new ReferenceType( *this ); } … … 356 377 bool isTtype() const; 357 378 379 bool isUnprototyped() const { return isVarArgs && parameters.size() == 0; } 380 358 381 virtual FunctionType *clone() const override { return new FunctionType( *this ); } 359 382 virtual void accept( Visitor & v ) override { v.visit( this ); } … … 404 427 /// Accesses generic parameters of base struct (NULL if none such) 405 428 std::list<TypeDecl*> * get_baseParameters(); 429 const std::list<TypeDecl*> * get_baseParameters() const; 406 430 407 431 virtual bool isComplete() const override; 408 432 409 virtual AggregateDecl * getAggr() override; 433 virtual AggregateDecl * getAggr() const override; 434 435 virtual TypeSubstitution genericSubstitution() const override; 410 436 411 437 /// Looks up the members of this struct named "name" and places them into "foundDecls". … … 437 463 438 464 /// Accesses generic parameters of base union (NULL if none such) 439 std::list< TypeDecl * > * get_baseParameters(); 465 std::list<TypeDecl*> * get_baseParameters(); 466 const std::list<TypeDecl*> * get_baseParameters() const; 440 467 441 468 virtual bool isComplete() const override; 442 469 443 virtual AggregateDecl * getAggr() override; 470 virtual AggregateDecl * getAggr() const override; 471 472 virtual TypeSubstitution genericSubstitution() const override; 444 473 445 474 /// looks up the members of this union named "name" and places them into "foundDecls" … … 471 500 472 501 virtual bool isComplete() const override; 502 503 virtual AggregateDecl * getAggr() const override; 473 504 474 505 virtual EnumInstType *clone() const override { return new EnumInstType( *this ); } … … 651 682 }; 652 683 684 class GlobalScopeType : public Type { 685 public: 686 GlobalScopeType(); 687 688 virtual GlobalScopeType *clone() const override { return new GlobalScopeType( *this ); } 689 virtual void accept( Visitor & v ) override { v.visit( this ); } 690 virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); } 691 virtual void print( std::ostream & os, Indenter indent = {} ) const override; 692 }; 693 653 694 // Local Variables: // 654 695 // tab-width: 4 //
Note:
See TracChangeset
for help on using the changeset viewer.