Changeset bc07190 for src/AST/Decl.hpp


Ignore:
Timestamp:
Jun 29, 2024, 7:33:28 AM (10 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
011c29e
Parents:
62a38e7 (diff), 115ac1ce (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/AST/Decl.hpp

    r62a38e7 rbc07190  
    308308class EnumDecl final : public AggregateDecl {
    309309public:
    310         // isTyped indicated if the enum has a declaration like:
     310        // isCfa indicated if the enum has a declaration like:
    311311        // enum (type_optional) Name {...}
    312         bool isTyped;
    313         // if isTyped == true && base.get() == nullptr, it is a "void" type enum
     312        bool isCfa;
     313        // if isCfa == true && base.get() == nullptr, it is a "opague" enum
    314314        ptr<Type> base;
    315315        enum class EnumHiding { Visible, Hide } hide;
    316316        std::vector< ast::ptr<ast::EnumInstType>> inlinedDecl; // child enums
    317317
    318         EnumDecl( const CodeLocation& loc, const std::string& name, bool isTyped = false,
     318        EnumDecl( const CodeLocation& loc, const std::string& name, bool isCfa = false,
    319319                std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall,
    320320                Type const * base = nullptr, EnumHiding hide = EnumHiding::Hide,
    321321                std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() )
    322         : AggregateDecl( loc, name, std::move(attrs), linkage ), isTyped(isTyped), base(base), hide(hide), enumValues(enumValues) {}
     322        : AggregateDecl( loc, name, std::move(attrs), linkage ), isCfa(isCfa), base(base), hide(hide), enumValues(enumValues) {}
    323323
    324324        /// gets the integer value for this enumerator, returning true iff value found
     
    336336
    337337        bool isSubTypeOf(const ast::EnumDecl *) const;
     338        bool isTyped() const;
     339        bool isOpague() const;
    338340private:
    339341        EnumDecl * clone() const override { return new EnumDecl{ *this }; }
Note: See TracChangeset for help on using the changeset viewer.