Changes in src/SynTree/Declaration.h [68f9c43:f6e3e34]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r68f9c43 rf6e3e34 45 45 Declaration( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage ); 46 46 Declaration( const Declaration &other ); 47 virtual ~Declaration(); 47 48 48 49 const std::string &get_name() const { return name; } … … 86 87 DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs ); 87 88 DeclarationWithType( const DeclarationWithType &other ); 88 89 virtual ~DeclarationWithType(); 90 89 91 std::string get_mangleName() const { return mangleName; } 90 92 DeclarationWithType * set_mangleName( std::string newValue ) { mangleName = newValue; return this; } … … 124 126 const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() ); 125 127 ObjectDecl( const ObjectDecl &other ); 128 virtual ~ObjectDecl(); 126 129 127 130 virtual Type * get_type() const override { return type; } … … 153 156 const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() ); 154 157 FunctionDecl( const FunctionDecl &other ); 158 virtual ~FunctionDecl(); 155 159 156 160 virtual Type * get_type() const override { return type; } … … 180 184 NamedTypeDecl( const std::string &name, Type::StorageClasses scs, Type *type ); 181 185 NamedTypeDecl( const NamedTypeDecl &other ); 186 virtual ~NamedTypeDecl(); 182 187 183 188 Type *get_base() const { return base; } … … 214 219 TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, bool sized, Type * init = nullptr ); 215 220 TypeDecl( const TypeDecl &other ); 221 virtual ~TypeDecl(); 216 222 217 223 Kind get_kind() const { return kind; } … … 262 268 AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ); 263 269 AggregateDecl( const AggregateDecl &other ); 264 270 virtual ~AggregateDecl(); 271 265 272 std::list<Declaration*>& get_members() { return members; } 266 273 std::list<TypeDecl*>& get_parameters() { return parameters; } … … 346 353 AsmDecl( AsmStmt *stmt ); 347 354 AsmDecl( const AsmDecl &other ); 355 virtual ~AsmDecl(); 348 356 349 357 AsmStmt *get_stmt() { return stmt; } … … 353 361 virtual void accept( Visitor &v ) override { v.visit( this ); } 354 362 virtual AsmDecl *acceptMutator( Mutator &m ) override { return m.mutate( this ); } 363 virtual void print( std::ostream &os, Indenter indent = {} ) const override; 364 virtual void printShort( std::ostream &os, Indenter indent = {} ) const override; 365 }; 366 367 class StaticAssertDecl : public Declaration { 368 public: 369 Expression * condition; 370 ConstantExpr * message; // string literal 371 372 StaticAssertDecl( Expression * condition, ConstantExpr * message ); 373 StaticAssertDecl( const StaticAssertDecl & other ); 374 virtual ~StaticAssertDecl(); 375 376 virtual StaticAssertDecl * clone() const override { return new StaticAssertDecl( *this ); } 377 virtual void accept( Visitor &v ) override { v.visit( this ); } 378 virtual StaticAssertDecl * acceptMutator( Mutator &m ) override { return m.mutate( this ); } 355 379 virtual void print( std::ostream &os, Indenter indent = {} ) const override; 356 380 virtual void printShort( std::ostream &os, Indenter indent = {} ) const override;
Note:
See TracChangeset
for help on using the changeset viewer.