- Timestamp:
- Nov 10, 2022, 8:21:54 PM (19 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 7491f97, e4d7c1c
- Parents:
- 639e4fc
- Location:
- src/AST
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r639e4fc r71806e0 236 236 } 237 237 238 // Inline ValueDecl vanish after EnumAndPointerDecay pass so no necessary to implement NewToOld239 const ast::DeclWithType * visit( const ast::Inline ValueDecl * node ) override final {238 // InlineMemberDecl vanish after EnumAndPointerDecay pass so no necessary to implement NewToOld 239 const ast::DeclWithType * visit( const ast::InlineMemberDecl * node ) override final { 240 240 assert( false ); 241 241 (void) node; … … 1869 1869 } 1870 1870 1871 virtual void visit( const Inline ValueDecl * old ) override final {1871 virtual void visit( const InlineMemberDecl * old ) override final { 1872 1872 if ( inCache( old ) ) { 1873 1873 return; … … 1876 1876 auto&& attr = GET_ACCEPT_V(attributes, Attribute); 1877 1877 1878 auto decl = new ast::Inline ValueDecl(1878 auto decl = new ast::InlineMemberDecl( 1879 1879 old->location, 1880 1880 old->name, -
src/AST/Decl.hpp
r639e4fc r71806e0 411 411 }; 412 412 413 class Inline ValueDecl final : public DeclWithType {413 class InlineMemberDecl final : public DeclWithType { 414 414 public: 415 415 ptr<Type> type; 416 416 417 Inline ValueDecl( const CodeLocation & loc, const std::string & name, const Type * type,417 InlineMemberDecl( const CodeLocation & loc, const std::string & name, const Type * type, 418 418 Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::Cforall, 419 419 std::vector< ptr<Attribute> > && attrs = {}, Function::Specs fs = {} ) … … 425 425 const DeclWithType * accept( Visitor& v ) const override { return v.visit( this ); } 426 426 private: 427 Inline ValueDecl * clone() const override { return new InlineValueDecl{ *this }; }427 InlineMemberDecl * clone() const override { return new InlineMemberDecl{ *this }; } 428 428 MUTATE_FRIEND 429 429 }; -
src/AST/Fwd.hpp
r639e4fc r71806e0 37 37 class DirectiveDecl; 38 38 class StaticAssertDecl; 39 class Inline ValueDecl;39 class InlineMemberDecl; 40 40 41 41 class Stmt; -
src/AST/Pass.hpp
r639e4fc r71806e0 141 141 const ast::DirectiveDecl * visit( const ast::DirectiveDecl * ) override final; 142 142 const ast::StaticAssertDecl * visit( const ast::StaticAssertDecl * ) override final; 143 const ast::DeclWithType * visit( const ast::Inline ValueDecl * ) override final;143 const ast::DeclWithType * visit( const ast::InlineMemberDecl * ) override final; 144 144 const ast::CompoundStmt * visit( const ast::CompoundStmt * ) override final; 145 145 const ast::Stmt * visit( const ast::ExprStmt * ) override final; -
src/AST/Pass.impl.hpp
r639e4fc r71806e0 805 805 // DeclWithType 806 806 template< typename core_t > 807 const ast::DeclWithType * ast::Pass< core_t >::visit( const ast::Inline ValueDecl * node ) {808 VISIT_START( node ); 809 810 if ( __visit_children() ) { 811 { 812 guard_symtab guard { *this }; 813 maybe_accept( node, &Inline ValueDecl::type );807 const ast::DeclWithType * ast::Pass< core_t >::visit( const ast::InlineMemberDecl * node ) { 808 VISIT_START( node ); 809 810 if ( __visit_children() ) { 811 { 812 guard_symtab guard { *this }; 813 maybe_accept( node, &InlineMemberDecl::type ); 814 814 } 815 815 } -
src/AST/Print.cpp
r639e4fc r71806e0 401 401 } 402 402 403 virtual const ast::DeclWithType * visit( const ast::Inline ValueDecl * node ) override final {403 virtual const ast::DeclWithType * visit( const ast::InlineMemberDecl * node ) override final { 404 404 os << "inline "; 405 405 if ( ! node->name.empty() ) os << node->name; -
src/AST/Visitor.hpp
r639e4fc r71806e0 33 33 virtual const ast::DirectiveDecl * visit( const ast::DirectiveDecl * ) = 0; 34 34 virtual const ast::StaticAssertDecl * visit( const ast::StaticAssertDecl * ) = 0; 35 virtual const ast::DeclWithType * visit( const ast::Inline ValueDecl * ) = 0;35 virtual const ast::DeclWithType * visit( const ast::InlineMemberDecl * ) = 0; 36 36 virtual const ast::CompoundStmt * visit( const ast::CompoundStmt * ) = 0; 37 37 virtual const ast::Stmt * visit( const ast::ExprStmt * ) = 0;
Note: See TracChangeset
for help on using the changeset viewer.