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