Changes in src/SynTree/Expression.h [42107b4:9a705dc8]
- File:
-
- 1 edited
-
src/SynTree/Expression.h (modified) (40 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r42107b4 r9a705dc8 41 41 ParamEntry( UniqueId decl, Type * actualType, Type * formalType, Expression* expr ): decl( decl ), actualType( actualType ), formalType( formalType ), expr( expr ), inferParams( new InferredParams ) {} 42 42 ParamEntry( const ParamEntry & other ); 43 ~ParamEntry(); 43 44 ParamEntry & operator=( const ParamEntry & other ); 44 45 … … 52 53 /// Expression is the root type for all expressions 53 54 class Expression : public BaseSyntaxNode { 54 protected:55 virtual ~Expression();56 57 55 public: 58 56 Type * result; … … 63 61 Expression(); 64 62 Expression( const Expression & other ); 63 virtual ~Expression(); 65 64 66 65 Type *& get_result() { return result; } … … 90 89 ApplicationExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >() ); 91 90 ApplicationExpr( const ApplicationExpr & other ); 91 virtual ~ApplicationExpr(); 92 92 93 93 Expression * get_function() const { return function; } … … 111 111 UntypedExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >() ); 112 112 UntypedExpr( const UntypedExpr & other ); 113 virtual ~UntypedExpr(); 113 114 114 115 Expression * get_function() const { return function; } … … 135 136 NameExpr( std::string name ); 136 137 NameExpr( const NameExpr & other ); 138 virtual ~NameExpr(); 137 139 138 140 const std::string & get_name() const { return name; } … … 155 157 AddressExpr( Expression * arg ); 156 158 AddressExpr( const AddressExpr & other ); 159 virtual ~AddressExpr(); 157 160 158 161 Expression * get_arg() const { return arg; } … … 173 176 LabelAddressExpr( const Label &arg ); 174 177 LabelAddressExpr( const LabelAddressExpr & other ); 178 virtual ~LabelAddressExpr(); 175 179 176 180 virtual LabelAddressExpr * clone() const { return new LabelAddressExpr( * this ); } … … 190 194 CastExpr( Expression * arg, void * ) = delete; // prevent accidentally passing pointers for isGenerated in the first constructor 191 195 CastExpr( const CastExpr & other ); 196 virtual ~CastExpr(); 192 197 193 198 Expression * get_arg() const { return arg; } … … 210 215 KeywordCastExpr( Expression * arg, Target target ); 211 216 KeywordCastExpr( const KeywordCastExpr & other ); 217 virtual ~KeywordCastExpr(); 212 218 213 219 const std::string & targetString() const; … … 226 232 VirtualCastExpr( Expression * arg, Type * toType ); 227 233 VirtualCastExpr( const VirtualCastExpr & other ); 234 virtual ~VirtualCastExpr(); 228 235 229 236 Expression * get_arg() const { return arg; } … … 244 251 UntypedMemberExpr( Expression * member, Expression * aggregate ); 245 252 UntypedMemberExpr( const UntypedMemberExpr & other ); 253 virtual ~UntypedMemberExpr(); 246 254 247 255 Expression * get_member() const { return member; } … … 265 273 MemberExpr( DeclarationWithType * member, Expression * aggregate ); 266 274 MemberExpr( const MemberExpr & other ); 275 virtual ~MemberExpr(); 267 276 268 277 DeclarationWithType * get_member() const { return member; } … … 285 294 VariableExpr( DeclarationWithType * var ); 286 295 VariableExpr( const VariableExpr & other ); 296 virtual ~VariableExpr(); 287 297 288 298 DeclarationWithType * get_var() const { return var; } … … 304 314 ConstantExpr( Constant constant ); 305 315 ConstantExpr( const ConstantExpr & other ); 316 virtual ~ConstantExpr(); 306 317 307 318 Constant * get_constant() { return & constant; } … … 327 338 SizeofExpr( const SizeofExpr & other ); 328 339 SizeofExpr( Type * type ); 340 virtual ~SizeofExpr(); 329 341 330 342 Expression * get_expr() const { return expr; } … … 351 363 AlignofExpr( const AlignofExpr & other ); 352 364 AlignofExpr( Type * type ); 365 virtual ~AlignofExpr(); 353 366 354 367 Expression * get_expr() const { return expr; } … … 373 386 UntypedOffsetofExpr( Type * type, const std::string & member ); 374 387 UntypedOffsetofExpr( const UntypedOffsetofExpr & other ); 388 virtual ~UntypedOffsetofExpr(); 375 389 376 390 std::string get_member() const { return member; } … … 393 407 OffsetofExpr( Type * type, DeclarationWithType * member ); 394 408 OffsetofExpr( const OffsetofExpr & other ); 409 virtual ~OffsetofExpr(); 395 410 396 411 Type * get_type() const { return type; } … … 412 427 OffsetPackExpr( StructInstType * type ); 413 428 OffsetPackExpr( const OffsetPackExpr & other ); 429 virtual ~OffsetPackExpr(); 414 430 415 431 StructInstType * get_type() const { return type; } … … 433 449 AttrExpr( const AttrExpr & other ); 434 450 AttrExpr( Expression * attr, Type * type ); 451 virtual ~AttrExpr(); 435 452 436 453 Expression * get_attr() const { return attr; } … … 457 474 LogicalExpr( Expression * arg1, Expression * arg2, bool andp = true ); 458 475 LogicalExpr( const LogicalExpr & other ); 476 virtual ~LogicalExpr(); 459 477 460 478 bool get_isAnd() const { return isAnd; } … … 482 500 ConditionalExpr( Expression * arg1, Expression * arg2, Expression * arg3 ); 483 501 ConditionalExpr( const ConditionalExpr & other ); 502 virtual ~ConditionalExpr(); 484 503 485 504 Expression * get_arg1() const { return arg1; } … … 504 523 CommaExpr( Expression * arg1, Expression * arg2 ); 505 524 CommaExpr( const CommaExpr & other ); 525 virtual ~CommaExpr(); 506 526 507 527 Expression * get_arg1() const { return arg1; } … … 523 543 TypeExpr( Type * type ); 524 544 TypeExpr( const TypeExpr & other ); 545 virtual ~TypeExpr(); 525 546 526 547 Type * get_type() const { return type; } … … 542 563 AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {} 543 564 AsmExpr( const AsmExpr & other ); 565 virtual ~AsmExpr() { delete inout; delete constraint; delete operand; }; 544 566 545 567 Expression * get_inout() const { return inout; } … … 563 585 /// along with a set of copy constructor calls, one for each argument. 564 586 class ImplicitCopyCtorExpr : public Expression { 565 protected:566 virtual ~ImplicitCopyCtorExpr();567 568 587 public: 569 588 ApplicationExpr * callExpr; … … 574 593 ImplicitCopyCtorExpr( ApplicationExpr * callExpr ); 575 594 ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ); 595 virtual ~ImplicitCopyCtorExpr(); 576 596 577 597 ApplicationExpr * get_callExpr() const { return callExpr; } … … 595 615 ConstructorExpr( Expression * callExpr ); 596 616 ConstructorExpr( const ConstructorExpr & other ); 617 ~ConstructorExpr(); 597 618 598 619 Expression * get_callExpr() const { return callExpr; } … … 612 633 CompoundLiteralExpr( Type * type, Initializer * initializer ); 613 634 CompoundLiteralExpr( const CompoundLiteralExpr & other ); 635 virtual ~CompoundLiteralExpr(); 614 636 615 637 Initializer * get_initializer() const { return initializer; } … … 648 670 UntypedTupleExpr( const std::list< Expression * > & exprs ); 649 671 UntypedTupleExpr( const UntypedTupleExpr & other ); 672 virtual ~UntypedTupleExpr(); 650 673 651 674 std::list<Expression*>& get_exprs() { return exprs; } … … 664 687 TupleExpr( const std::list< Expression * > & exprs ); 665 688 TupleExpr( const TupleExpr & other ); 689 virtual ~TupleExpr(); 666 690 667 691 std::list<Expression*>& get_exprs() { return exprs; } … … 681 705 TupleIndexExpr( Expression * tuple, unsigned int index ); 682 706 TupleIndexExpr( const TupleIndexExpr & other ); 707 virtual ~TupleIndexExpr(); 683 708 684 709 Expression * get_tuple() const { return tuple; } … … 700 725 TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls ); 701 726 TupleAssignExpr( const TupleAssignExpr & other ); 727 virtual ~TupleAssignExpr(); 702 728 703 729 TupleAssignExpr * set_stmtExpr( StmtExpr * newValue ) { stmtExpr = newValue; return this; } … … 719 745 StmtExpr( CompoundStmt * statements ); 720 746 StmtExpr( const StmtExpr & other ); 747 virtual ~StmtExpr(); 721 748 722 749 CompoundStmt * get_statements() const { return statements; } … … 743 770 UniqueExpr( Expression * expr, long long idVal = -1 ); 744 771 UniqueExpr( const UniqueExpr & other ); 772 ~UniqueExpr(); 745 773 746 774 Expression * get_expr() const { return expr; } … … 772 800 InitAlternative( const InitAlternative & other ); 773 801 InitAlternative & operator=( const Initializer & other ) = delete; // at the moment this isn't used, and I don't want to implement it 802 ~InitAlternative(); 774 803 }; 775 804 … … 781 810 UntypedInitExpr( Expression * expr, const std::list<InitAlternative> & initAlts ); 782 811 UntypedInitExpr( const UntypedInitExpr & other ); 812 ~UntypedInitExpr(); 783 813 784 814 Expression * get_expr() const { return expr; } … … 800 830 InitExpr( Expression * expr, Designation * designation ); 801 831 InitExpr( const InitExpr & other ); 832 ~InitExpr(); 802 833 803 834 Expression * get_expr() const { return expr; } … … 821 852 DeletedExpr( Expression * expr, BaseSyntaxNode * deleteStmt ); 822 853 DeletedExpr( const DeletedExpr & other ); 854 ~DeletedExpr(); 823 855 824 856 virtual DeletedExpr * clone() const { return new DeletedExpr( * this ); }
Note:
See TracChangeset
for help on using the changeset viewer.