Changeset de8a0a4 for src/AST/Expr.hpp


Ignore:
Timestamp:
Jan 26, 2025, 6:37:05 PM (2 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
a950021
Parents:
0f070a4 (diff), 11f92fac (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/Expr.hpp

    r0f070a4 rde8a0a4  
    490490};
    491491
    492 class CountExpr final : public Expr {
    493 public:
    494         ptr<Expr> expr;
    495         ptr<Type> type;
    496 
    497         CountExpr( const CodeLocation & loc, const Expr * t );
    498         CountExpr( const CodeLocation & loc, const Type * t );
    499 
    500         const Expr * accept( Visitor & v )const override { return v.visit( this ); }
    501 private:
    502         CountExpr * clone() const override { return new CountExpr( *this ); }
    503         MUTATE_FRIEND
    504 };
    505 
    506492/// alignof expression, e.g. `alignof(int)`, `alignof 3+4`
    507493class AlignofExpr final : public Expr {
     
    514500private:
    515501        AlignofExpr * clone() const override { return new AlignofExpr{ *this }; }
     502        MUTATE_FRIEND
     503};
     504
     505/// countof expression, e.g. `countof(AnEnum)`, `countof pred(Head)`
     506class CountofExpr final : public Expr {
     507public:
     508        ptr<Type> type;
     509
     510        CountofExpr( const CodeLocation & loc, const Type * t );
     511
     512        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     513private:
     514        CountofExpr * clone() const override { return new CountofExpr( *this ); }
    516515        MUTATE_FRIEND
    517516};
Note: See TracChangeset for help on using the changeset viewer.