Ignore:
Timestamp:
Mar 16, 2017, 8:23:42 AM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
26ba208
Parents:
6e8bd43
git-author:
Peter A. Buhr <pabuhr@…> (03/16/17 08:19:39)
git-committer:
Peter A. Buhr <pabuhr@…> (03/16/17 08:23:42)
Message:

move type StorageClasses? from DeclarationNode? to Type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r6e8bd43 r68fe077a  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 07:40:42 2017
    13 // Update Count     : 113
     12// Last Modified On : Thu Mar 16 07:48:23 2017
     13// Update Count     : 117
    1414//
    1515
     
    2828class Declaration : public BaseSyntaxNode {
    2929  public:
    30         Declaration( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage );
     30        Declaration( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage );
    3131        Declaration( const Declaration &other );
    3232        virtual ~Declaration();
     
    3535        void set_name( std::string newValue ) { name = newValue; }
    3636
    37         DeclarationNode::StorageClasses get_storageClasses() const { return storageClasses; }
     37        Type::StorageClasses get_storageClasses() const { return storageClasses; }
    3838
    3939        LinkageSpec::Spec get_linkage() const { return linkage; }
     
    5656  private:
    5757        std::string name;
    58         DeclarationNode::StorageClasses storageClasses;
     58        Type::StorageClasses storageClasses;
    5959        LinkageSpec::Spec linkage;
    6060        UniqueId uniqueId;
     
    6464class DeclarationWithType : public Declaration {
    6565  public:
    66         DeclarationWithType( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, DeclarationNode::FuncSpecifiers fs );
     66        DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, DeclarationNode::FuncSpecifiers fs );
    6767        DeclarationWithType( const DeclarationWithType &other );
    6868        virtual ~DeclarationWithType();
     
    104104        typedef DeclarationWithType Parent;
    105105  public:
    106         ObjectDecl( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init,
     106        ObjectDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init,
    107107                                const std::list< Attribute * > attributes = std::list< Attribute * >(), DeclarationNode::FuncSpecifiers fs = DeclarationNode::FuncSpecifiers() );
    108108        ObjectDecl( const ObjectDecl &other );
     
    132132        typedef DeclarationWithType Parent;
    133133  public:
    134         FunctionDecl( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements,
     134        FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements,
    135135                                  const std::list< Attribute * > attributes = std::list< Attribute * >(), DeclarationNode::FuncSpecifiers fs = DeclarationNode::FuncSpecifiers() );
    136136        FunctionDecl( const FunctionDecl &other );
     
    158158        typedef Declaration Parent;
    159159  public:
    160         NamedTypeDecl( const std::string &name, DeclarationNode::StorageClasses scs, Type *type );
     160        NamedTypeDecl( const std::string &name, Type::StorageClasses scs, Type *type );
    161161        NamedTypeDecl( const NamedTypeDecl &other );
    162162        virtual ~NamedTypeDecl();
     
    193193        };
    194194
    195         TypeDecl( const std::string &name, DeclarationNode::StorageClasses scs, Type *type, Kind kind );
     195        TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind );
    196196        TypeDecl( const TypeDecl &other );
    197197
     
    214214        typedef NamedTypeDecl Parent;
    215215  public:
    216         TypedefDecl( const std::string &name, DeclarationNode::StorageClasses scs, Type *type ) : Parent( name, scs, type ) {}
     216        TypedefDecl( const std::string &name, Type::StorageClasses scs, Type *type ) : Parent( name, scs, type ) {}
    217217        TypedefDecl( const TypedefDecl &other ) : Parent( other ) {}
    218218
Note: See TracChangeset for help on using the changeset viewer.