Changeset 7f6a7c9 for src/AST/Decl.hpp


Ignore:
Timestamp:
Sep 21, 2022, 11:02:15 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
95dab9e
Parents:
428adbc (diff), 0bd46fd (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' into pthread-emulation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.hpp

    r428adbc r7f6a7c9  
    217217
    218218        /// convenience accessor to match Type::isComplete()
    219         bool isComplete() { return sized; }
     219        bool isComplete() const { return sized; }
    220220
    221221        const Decl * accept( Visitor & v ) const override { return v.visit( this ); }
     
    312312class EnumDecl final : public AggregateDecl {
    313313public:
     314        bool isTyped;
    314315        ptr<Type> base;
    315316
    316         EnumDecl( const CodeLocation& loc, const std::string& name,
    317                 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, Type const * base = nullptr,
     317        EnumDecl( const CodeLocation& loc, const std::string& name, bool isTyped = false,
     318                std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall,
     319                Type const * base = nullptr,
    318320                std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() )
    319         : AggregateDecl( loc, name, std::move(attrs), linkage ), base(base), enumValues(enumValues) {}
     321        : AggregateDecl( loc, name, std::move(attrs), linkage ), isTyped(isTyped), base(base), enumValues(enumValues) {}
    320322
    321323        /// gets the integer value for this enumerator, returning true iff value found
     
    327329        const char * typeString() const override { return aggrString( Enum ); }
    328330
    329         bool isTyped() {return base && base.get();}
    330331
    331332private:
Note: See TracChangeset for help on using the changeset viewer.