Changeset e67991f for src/SymTab/Indexer.h
- Timestamp:
- Jul 16, 2019, 10:38:32 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 6f15121
- Parents:
- 7dc2e57b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.h
r7dc2e57b re67991f 44 44 45 45 /// non-null if this declaration is deleted 46 const BaseSyntaxNode* deleteStmt = nullptr;46 const Declaration * deleteStmt = nullptr; 47 47 /// scope of identifier 48 48 unsigned long scope = 0; … … 51 51 IdData() = default; 52 52 IdData( 53 const DeclarationWithType * id, const Expression * baseExpr, const BaseSyntaxNode* deleteStmt,53 const DeclarationWithType * id, const Expression * baseExpr, const Declaration * deleteStmt, 54 54 unsigned long scope ) 55 55 : id( id ), baseExpr( baseExpr ), deleteStmt( deleteStmt ), scope( scope ) {} 56 IdData( const IdData& o, const BaseSyntaxNode* deleteStmt )56 IdData( const IdData& o, const Declaration * deleteStmt ) 57 57 : id( o.id ), baseExpr( o.baseExpr ), deleteStmt( deleteStmt ), scope( o.scope ) {} 58 58 … … 83 83 84 84 void addId( const DeclarationWithType * decl, const Expression * baseExpr = nullptr ); 85 void addDeletedId( const DeclarationWithType * decl, const BaseSyntaxNode* deleteStmt );85 void addDeletedId( const DeclarationWithType * decl, const Declaration * deleteStmt ); 86 86 87 87 void addType( const NamedTypeDecl * decl ); … … 94 94 95 95 /// adds all of the IDs from WithStmt exprs 96 void addWith( const std::list< Expression * > & withExprs, const BaseSyntaxNode* withStmt );96 void addWith( const std::list< Expression * > & withExprs, const Declaration * withStmt ); 97 97 98 98 /// convenience function for adding a list of Ids to the indexer … … 152 152 Delete ///< Delete the earlier version with the delete statement 153 153 } mode; 154 const BaseSyntaxNode* deleteStmt; ///< Statement that deletes this expression154 const Declaration * deleteStmt; ///< Statement that deletes this expression 155 155 156 156 private: 157 157 OnConflict() : mode(Error), deleteStmt(nullptr) {} 158 OnConflict( const BaseSyntaxNode* d ) : mode(Delete), deleteStmt(d) {}158 OnConflict( const Declaration * d ) : mode(Delete), deleteStmt(d) {} 159 159 public: 160 160 OnConflict( const OnConflict& ) = default; 161 161 162 162 static OnConflict error() { return {}; } 163 static OnConflict deleteWith( const BaseSyntaxNode* d ) { return { d }; }163 static OnConflict deleteWith( const Declaration * d ) { return { d }; } 164 164 }; 165 165 … … 167 167 bool addedIdConflicts( 168 168 const IdData & existing, const DeclarationWithType * added, OnConflict handleConflicts, 169 const BaseSyntaxNode* deleteStmt );169 const Declaration * deleteStmt ); 170 170 171 171 /// common code for addId, addDeletedId, etc. 172 172 void addId(const DeclarationWithType * decl, OnConflict handleConflicts, 173 const Expression * baseExpr = nullptr, const BaseSyntaxNode* deleteStmt = nullptr );173 const Expression * baseExpr = nullptr, const Declaration * deleteStmt = nullptr ); 174 174 175 175 /// adds all of the members of the Aggregate (addWith helper)
Note: See TracChangeset
for help on using the changeset viewer.