- Timestamp:
- Jun 3, 2019, 5:36:47 PM (6 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:
- 98a8290, ee574a2
- Parents:
- f474e91 (diff), dafe9e1 (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. - Location:
- src/AST
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
rf474e91 r4ae2364 47 47 namespace { 48 48 49 // This is to preserve the SymTab::dereferenceOperatorhack. It does not (and perhaps should not)49 // This is to preserve the FindSpecialDecls hack. It does not (and perhaps should not) 50 50 // allow us to use the same stratagy in the new ast. 51 51 ast::FunctionDecl * dereferenceOperator = nullptr; 52 ast::StructDecl * dtorStruct = nullptr; 53 ast::FunctionDecl * dtorStructDestroy = nullptr; 52 54 53 55 } … … 176 178 Validate::dereferenceOperator = decl; 177 179 } 180 if ( dtorStructDestroy == node ) { 181 Validate::dtorStructDestroy = decl; 182 } 178 183 return declWithTypePostamble( decl, node ); 179 184 } … … 231 236 LinkageSpec::Spec( node->linkage.val ) 232 237 ); 238 239 if ( dtorStruct == node ) { 240 Validate::dtorStruct = decl; 241 } 242 233 243 return aggregatePostamble( decl, node ); 234 244 } … … 1458 1468 dereferenceOperator = decl; 1459 1469 } 1470 1471 if ( Validate::dtorStructDestroy == old ) { 1472 dtorStructDestroy = decl; 1473 } 1460 1474 } 1461 1475 … … 1479 1493 1480 1494 this->node = decl; 1495 1496 if ( Validate::dtorStruct == old ) { 1497 dtorStruct = decl; 1498 } 1481 1499 } 1482 1500 -
src/AST/Node.hpp
rf474e91 r4ae2364 10 10 // Created On : Wed May 8 10:27:04 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu May 23 16:00:00 201913 // Update Count : 412 // Last Modified On : Mon Jun 3 13:26:00 2019 13 // Update Count : 5 14 14 // 15 15 … … 107 107 ptr_base() : node(nullptr) {} 108 108 ptr_base( const node_t * n ) : node(n) { if( node ) _inc(node); } 109 ~ptr_base() { if( node ) _dec(node);}109 ~ptr_base() { if( node ) { auto tmp = node; node = nullptr; _dec(tmp); } } 110 110 111 111 ptr_base( const ptr_base & o ) : node(o.node) { … … 127 127 template<typename o_node_t> 128 128 ptr_base & operator=( const o_node_t * node ) { 129 assign( node ? strict_dynamic_cast<const node_t *>(node) : nullptr);129 assign( strict_dynamic_cast<const node_t *, nullptr>(node) ); 130 130 return *this; 131 131 } -
src/AST/Type.hpp
rf474e91 r4ae2364 48 48 49 49 Type * set_const( bool v ) { qualifiers.is_const = v; return this; } 50 Type * set_volatile( bool v ) { qualifiers.is_volatile = v; return this; } 50 51 Type * set_restrict( bool v ) { qualifiers.is_restrict = v; return this; } 51 52 Type * set_lvalue( bool v ) { qualifiers.is_lvalue = v; return this; } -
src/AST/TypeSubstitution.cpp
rf474e91 r4ae2364 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Mar 16 15:54:35201713 // Update Count : 411 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Jun 3 13:26:00 2017 13 // Update Count : 5 14 14 // 15 15 … … 26 26 } 27 27 28 TypeSubstitution::~TypeSubstitution() { 29 for ( TypeEnvType::iterator i = typeEnv.begin(); i != typeEnv.end(); ++i ) { 30 delete( i->second ); 31 } 32 for ( VarEnvType::iterator i = varEnv.begin(); i != varEnv.end(); ++i ) { 33 delete( i->second ); 34 } 35 } 28 TypeSubstitution::~TypeSubstitution() {} 36 29 37 30 TypeSubstitution &TypeSubstitution::operator=( const TypeSubstitution &other ) {
Note: See TracChangeset
for help on using the changeset viewer.