Changeset dd7c2ce0 for src/AST/Decl.hpp
- Timestamp:
- Oct 24, 2023, 4:54:33 PM (14 months ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
r1da2affb rdd7c2ce0 125 125 126 126 /// Object declaration `int foo()` 127 class FunctionDecl : public DeclWithType {127 class FunctionDecl final : public DeclWithType { 128 128 public: 129 129 std::vector<ptr<TypeDecl>> type_params; … … 314 314 class EnumDecl final : public AggregateDecl { 315 315 public: 316 bool isTyped;// isTyped indicated if the enum has a declaration like:316 // isTyped indicated if the enum has a declaration like: 317 317 // 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; 319 321 enum class EnumHiding { Visible, Hide } hide; 320 322 … … 374 376 375 377 /// Assembly declaration: `asm ... ( "..." : ... )` 376 class AsmDecl : public Decl {378 class AsmDecl final : public Decl { 377 379 public: 378 380 ptr<AsmStmt> stmt; 379 381 380 382 AsmDecl( const CodeLocation & loc, AsmStmt * stmt ) 381 : Decl( loc, "", {}, {}), stmt(stmt) {}383 : Decl( loc, "", {}, Linkage::C ), stmt(stmt) {} 382 384 383 385 const AsmDecl * accept( Visitor & v ) const override { return v.visit( this ); } … … 388 390 389 391 /// C-preprocessor directive `#...` 390 class DirectiveDecl : public Decl {392 class DirectiveDecl final : public Decl { 391 393 public: 392 394 ptr<DirectiveStmt> stmt; 393 395 394 396 DirectiveDecl( const CodeLocation & loc, DirectiveStmt * stmt ) 395 : Decl( loc, "", {}, {}), stmt(stmt) {}397 : Decl( loc, "", {}, Linkage::C ), stmt(stmt) {} 396 398 397 399 const DirectiveDecl * accept( Visitor & v ) const override { return v.visit( this ); } … … 402 404 403 405 /// Static Assertion `_Static_assert( ... , ... );` 404 class StaticAssertDecl : public Decl {406 class StaticAssertDecl final : public Decl { 405 407 public: 406 408 ptr<Expr> cond; … … 408 410 409 411 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 ) {} 411 413 412 414 const StaticAssertDecl * accept( Visitor & v ) const override { return v.visit( this ); }
Note: See TracChangeset
for help on using the changeset viewer.