Changes in src/AST/SymbolTable.hpp [99d4584:e67991f]
- File:
-
- 1 edited
-
src/AST/SymbolTable.hpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/SymbolTable.hpp
r99d4584 re67991f 37 37 readonly<DeclWithType> id = nullptr; ///< Identifier of declaration 38 38 readonly<Expr> baseExpr = nullptr; ///< Implied containing aggregate (from WithExpr) 39 readonly< Node> deleter = nullptr; ///< Node deleting this declaration (if non-null)39 readonly<Decl> deleter = nullptr; ///< Node deleting this declaration (if non-null) 40 40 unsigned long scope = 0; ///< Scope of identifier 41 41 42 42 IdData() = default; 43 IdData( const DeclWithType * i, const Expr * base, const Node * del, unsigned long s )43 IdData( const DeclWithType * i, const Expr * base, const Decl * del, unsigned long s ) 44 44 : id( i ), baseExpr( base ), deleter( del ), scope( s ) {} 45 45 46 46 /// Modify an existing node with a new deleter 47 IdData( const IdData & o, const Node* del )47 IdData( const IdData & o, const Decl * del ) 48 48 : id( o.id ), baseExpr( o.baseExpr ), deleter( del ), scope( o.scope ) {} 49 49 … … 58 58 struct scoped { 59 59 readonly<D> decl; ///< wrapped declaration 60 unsigned long scope; ///< scope of this declaration 60 unsigned long scope; ///< scope of this declaration 61 61 62 62 scoped(const D * d, unsigned long s) : decl(d), scope(s) {} … … 88 88 ~SymbolTable(); 89 89 90 // when using an indexer manually (e.g., within a mutator traversal), it is necessary to 90 // when using an indexer manually (e.g., within a mutator traversal), it is necessary to 91 91 // tell the indexer explicitly when scopes begin and end 92 92 void enterScope(); … … 118 118 void addId( const DeclWithType * decl, const Expr * baseExpr = nullptr ); 119 119 /// Adds a deleted identifier declaration to the symbol table 120 void addDeletedId( const DeclWithType * decl, const Node* deleter );120 void addDeletedId( const DeclWithType * decl, const Decl * deleter ); 121 121 122 122 /// Adds a type to the symbol table … … 136 136 137 137 /// adds all of the IDs from WithStmt exprs 138 void addWith( const std::vector< ptr<Expr> > & withExprs, const Node* withStmt );138 void addWith( const std::vector< ptr<Expr> > & withExprs, const Decl * withStmt ); 139 139 140 140 /// convenience function for adding a list of Ids to the indexer … … 154 154 const SymbolTable * atScope( unsigned long i ) const; 155 155 156 /// Removes matching autogenerated constructors and destructors so that they will not be 156 /// Removes matching autogenerated constructors and destructors so that they will not be 157 157 /// selected. If returns false, passed decl should not be added. 158 158 bool removeSpecialOverrides( IdData & decl, MangleTable::Ptr & mangleTable ); … … 164 164 Delete ///< Delete the earlier version with the delete statement 165 165 } mode; 166 const Node* deleter; ///< Statement that deletes this expression166 const Decl * deleter; ///< Statement that deletes this expression 167 167 168 168 private: 169 169 OnConflict() : mode(Error), deleter(nullptr) {} 170 OnConflict( const Node* d ) : mode(Delete), deleter(d) {}170 OnConflict( const Decl * d ) : mode(Delete), deleter(d) {} 171 171 public: 172 172 OnConflict( const OnConflict& ) = default; 173 173 174 174 static OnConflict error() { return {}; } 175 static OnConflict deleteWith( const Node* d ) { return { d }; }175 static OnConflict deleteWith( const Decl * d ) { return { d }; } 176 176 }; 177 177 178 178 /// true if the existing identifier conflicts with the added identifier 179 179 bool addedIdConflicts( 180 const IdData & existing, const DeclWithType * added, OnConflict handleConflicts, 181 const Node* deleter );180 const IdData & existing, const DeclWithType * added, OnConflict handleConflicts, 181 const Decl * deleter ); 182 182 183 183 /// common code for addId, addDeletedId, etc. 184 void addId( 185 const DeclWithType * decl, OnConflict handleConflicts, const Expr * baseExpr = nullptr, 186 const Node* deleter = nullptr );184 void addId( 185 const DeclWithType * decl, OnConflict handleConflicts, const Expr * baseExpr = nullptr, 186 const Decl * deleter = nullptr ); 187 187 188 188 /// adds all of the members of the Aggregate (addWith helper)
Note:
See TracChangeset
for help on using the changeset viewer.