Changes in src/SynTree/Declaration.h [3a5131ed:a7c90d4]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r3a5131ed ra7c90d4 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Feb 16 14:53:35201713 // Update Count : 5712 // Last Modified On : Tue Mar 7 07:40:42 2017 13 // Update Count : 113 14 14 // 15 15 … … 28 28 class Declaration : public BaseSyntaxNode { 29 29 public: 30 Declaration( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage );30 Declaration( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage ); 31 31 Declaration( const Declaration &other ); 32 32 virtual ~Declaration(); … … 34 34 const std::string &get_name() const { return name; } 35 35 void set_name( std::string newValue ) { name = newValue; } 36 DeclarationNode::StorageClass get_storageClass() const { return storageClass; } 37 void set_storageClass( DeclarationNode::StorageClass newValue ) { storageClass = newValue; } 36 37 DeclarationNode::StorageClasses get_storageClasses() const { return storageClasses; } 38 38 39 LinkageSpec::Spec get_linkage() const { return linkage; } 39 40 void set_linkage( LinkageSpec::Spec newValue ) { linkage = newValue; } 40 bool get_isInline() const { return isInline; } 41 void set_isInline( bool newValue ) { isInline = newValue; } 42 bool get_isNoreturn() const { return isNoreturn; } 43 void set_isNoreturn( bool newValue ) { isNoreturn = newValue; } 41 44 42 UniqueId get_uniqueId() const { return uniqueId; } 43 45 44 bool get_extension() const { return extension; } 46 45 Declaration *set_extension( bool exten ) { extension = exten; return this; } … … 57 56 private: 58 57 std::string name; 59 DeclarationNode::StorageClass storageClass;58 DeclarationNode::StorageClasses storageClasses; 60 59 LinkageSpec::Spec linkage; 61 bool isInline, isNoreturn;62 60 UniqueId uniqueId; 63 61 bool extension = false; … … 66 64 class DeclarationWithType : public Declaration { 67 65 public: 68 DeclarationWithType( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes );66 DeclarationWithType( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, DeclarationNode::FuncSpecifiers fs ); 69 67 DeclarationWithType( const DeclarationWithType &other ); 70 68 virtual ~DeclarationWithType(); … … 83 81 std::list< Attribute * >& get_attributes() { return attributes; } 84 82 const std::list< Attribute * >& get_attributes() const { return attributes; } 83 84 DeclarationNode::FuncSpecifiers get_funcSpec() const { return fs; } 85 //void set_functionSpecifiers( DeclarationNode::FuncSpecifiers newValue ) { fs = newValue; } 85 86 86 87 virtual DeclarationWithType *clone() const = 0; … … 97 98 ConstantExpr *asmName; 98 99 std::list< Attribute * > attributes; 100 DeclarationNode::FuncSpecifiers fs; 99 101 }; 100 102 … … 102 104 typedef DeclarationWithType Parent; 103 105 public: 104 ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, const std::list< Attribute * > attributes = std::list< Attribute * >(), bool isInline = false, bool isNoreturn = false ); 106 ObjectDecl( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, 107 const std::list< Attribute * > attributes = std::list< Attribute * >(), DeclarationNode::FuncSpecifiers fs = DeclarationNode::FuncSpecifiers() ); 105 108 ObjectDecl( const ObjectDecl &other ); 106 109 virtual ~ObjectDecl(); … … 129 132 typedef DeclarationWithType Parent; 130 133 public: 131 FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, const std::list< Attribute * > attributes = std::list< Attribute * >() ); 134 FunctionDecl( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, 135 const std::list< Attribute * > attributes = std::list< Attribute * >(), DeclarationNode::FuncSpecifiers fs = DeclarationNode::FuncSpecifiers() ); 132 136 FunctionDecl( const FunctionDecl &other ); 133 137 virtual ~FunctionDecl(); … … 154 158 typedef Declaration Parent; 155 159 public: 156 NamedTypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type );160 NamedTypeDecl( const std::string &name, DeclarationNode::StorageClasses scs, Type *type ); 157 161 NamedTypeDecl( const NamedTypeDecl &other ); 158 162 virtual ~NamedTypeDecl(); … … 189 193 }; 190 194 191 TypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type, Kind kind );195 TypeDecl( const std::string &name, DeclarationNode::StorageClasses scs, Type *type, Kind kind ); 192 196 TypeDecl( const TypeDecl &other ); 193 197 … … 210 214 typedef NamedTypeDecl Parent; 211 215 public: 212 TypedefDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type ) : Parent( name, sc, type ) {}216 TypedefDecl( const std::string &name, DeclarationNode::StorageClasses scs, Type *type ) : Parent( name, scs, type ) {} 213 217 TypedefDecl( const TypedefDecl &other ) : Parent( other ) {} 214 218
Note:
See TracChangeset
for help on using the changeset viewer.