Changeset dd7c2ce0 for src/AST/Decl.hpp


Ignore:
Timestamp:
Oct 24, 2023, 4:54:33 PM (14 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
e832485
Parents:
1da2affb (diff), a1da039 (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
  • src/AST/Decl.hpp

    r1da2affb rdd7c2ce0  
    125125
    126126/// Object declaration `int foo()`
    127 class FunctionDecl : public DeclWithType {
     127class FunctionDecl final : public DeclWithType {
    128128public:
    129129        std::vector<ptr<TypeDecl>> type_params;
     
    314314class EnumDecl final : public AggregateDecl {
    315315public:
    316         bool isTyped; // isTyped indicated if the enum has a declaration like:
     316        // isTyped indicated if the enum has a declaration like:
    317317        // enum (type_optional) Name {...}
    318         ptr<Type> base; // if isTyped == true && base.get() == nullptr, it is a "void" type enum
     318        bool isTyped;
     319        // if isTyped == true && base.get() == nullptr, it is a "void" type enum
     320        ptr<Type> base;
    319321        enum class EnumHiding { Visible, Hide } hide;
    320322
     
    374376
    375377/// Assembly declaration: `asm ... ( "..." : ... )`
    376 class AsmDecl : public Decl {
     378class AsmDecl final : public Decl {
    377379public:
    378380        ptr<AsmStmt> stmt;
    379381
    380382        AsmDecl( const CodeLocation & loc, AsmStmt * stmt )
    381         : Decl( loc, "", {}, {} ), stmt(stmt) {}
     383        : Decl( loc, "", {}, Linkage::C ), stmt(stmt) {}
    382384
    383385        const AsmDecl * accept( Visitor & v ) const override { return v.visit( this ); }
     
    388390
    389391/// C-preprocessor directive `#...`
    390 class DirectiveDecl : public Decl {
     392class DirectiveDecl final : public Decl {
    391393public:
    392394        ptr<DirectiveStmt> stmt;
    393395
    394396        DirectiveDecl( const CodeLocation & loc, DirectiveStmt * stmt )
    395         : Decl( loc, "", {}, {} ), stmt(stmt) {}
     397        : Decl( loc, "", {}, Linkage::C ), stmt(stmt) {}
    396398
    397399        const DirectiveDecl * accept( Visitor & v ) const override { return v.visit( this ); }
     
    402404
    403405/// Static Assertion `_Static_assert( ... , ... );`
    404 class StaticAssertDecl : public Decl {
     406class StaticAssertDecl final : public Decl {
    405407public:
    406408        ptr<Expr> cond;
     
    408410
    409411        StaticAssertDecl( const CodeLocation & loc, const Expr * condition, const ConstantExpr * msg )
    410         : Decl( loc, "", {}, {} ), cond( condition ), msg( msg ) {}
     412        : Decl( loc, "", {}, Linkage::C ), cond( condition ), msg( msg ) {}
    411413
    412414        const StaticAssertDecl * accept( Visitor & v ) const override { return v.visit( this ); }
Note: See TracChangeset for help on using the changeset viewer.