Changes in src/AST/Decl.hpp [a1da039:c8bf1b5]
- File:
-
- 1 edited
-
src/AST/Decl.hpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
ra1da039 rc8bf1b5 125 125 126 126 /// Object declaration `int foo()` 127 class FunctionDecl final: public DeclWithType {127 class FunctionDecl : public DeclWithType { 128 128 public: 129 129 std::vector<ptr<TypeDecl>> type_params; … … 314 314 class EnumDecl final : public AggregateDecl { 315 315 public: 316 // isTyped indicated if the enum has a declaration like:316 bool isTyped; // isTyped indicated if the enum has a declaration like: 317 317 // enum (type_optional) Name {...} 318 bool isTyped; 319 // if isTyped == true && base.get() == nullptr, it is a "void" type enum 320 ptr<Type> base; 318 ptr<Type> base; // if isTyped == true && base.get() == nullptr, it is a "void" type enum 321 319 enum class EnumHiding { Visible, Hide } hide; 322 320 … … 376 374 377 375 /// Assembly declaration: `asm ... ( "..." : ... )` 378 class AsmDecl final: public Decl {376 class AsmDecl : public Decl { 379 377 public: 380 378 ptr<AsmStmt> stmt; 381 379 382 380 AsmDecl( const CodeLocation & loc, AsmStmt * stmt ) 383 : Decl( loc, "", {}, Linkage::C), stmt(stmt) {}381 : Decl( loc, "", {}, {} ), stmt(stmt) {} 384 382 385 383 const AsmDecl * accept( Visitor & v ) const override { return v.visit( this ); } … … 390 388 391 389 /// C-preprocessor directive `#...` 392 class DirectiveDecl final: public Decl {390 class DirectiveDecl : public Decl { 393 391 public: 394 392 ptr<DirectiveStmt> stmt; 395 393 396 394 DirectiveDecl( const CodeLocation & loc, DirectiveStmt * stmt ) 397 : Decl( loc, "", {}, Linkage::C), stmt(stmt) {}395 : Decl( loc, "", {}, {} ), stmt(stmt) {} 398 396 399 397 const DirectiveDecl * accept( Visitor & v ) const override { return v.visit( this ); } … … 404 402 405 403 /// Static Assertion `_Static_assert( ... , ... );` 406 class StaticAssertDecl final: public Decl {404 class StaticAssertDecl : public Decl { 407 405 public: 408 406 ptr<Expr> cond; … … 410 408 411 409 StaticAssertDecl( const CodeLocation & loc, const Expr * condition, const ConstantExpr * msg ) 412 : Decl( loc, "", {}, Linkage::C), cond( condition ), msg( msg ) {}410 : Decl( loc, "", {}, {} ), cond( condition ), msg( msg ) {} 413 411 414 412 const StaticAssertDecl * accept( Visitor & v ) const override { return v.visit( this ); }
Note:
See TracChangeset
for help on using the changeset viewer.