Changeset 043a5b6


Ignore:
Timestamp:
May 30, 2019, 9:48:47 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
a935892
Parents:
0aedb01
Message:

Extended dereference operator hack to destroy clause

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r0aedb01 r043a5b6  
    4747namespace {
    4848
    49 // This is to preserve the SymTab::dereferenceOperator hack. It does not (and perhaps should not)
     49// This is to preserve the FindSpecialDecls hack. It does not (and perhaps should not)
    5050// allow us to use the same stratagy in the new ast.
    5151ast::FunctionDecl * dereferenceOperator = nullptr;
     52ast::StructDecl   * dtorStruct = nullptr;
     53ast::FunctionDecl * dtorStructDestroy = nullptr;
    5254
    5355}
     
    174176                        Validate::dereferenceOperator = decl;
    175177                }
     178                if ( dtorStructDestroy == node ) {
     179                        Validate::dtorStructDestroy = decl;
     180                }
    176181                return declWithTypePostamble( decl, node );
    177182        }
     
    229234                        LinkageSpec::Spec( node->linkage.val )
    230235                );
     236
     237                if ( dtorStruct == node ) {
     238                        Validate::dtorStruct = decl;
     239                }
     240
    231241                return aggregatePostamble( decl, node );
    232242        }
     
    14541464                        dereferenceOperator = decl;
    14551465                }
     1466
     1467                if ( Validate::dtorStructDestroy == old ) {
     1468                        dtorStructDestroy = decl;
     1469                }
    14561470        }
    14571471
     
    14751489
    14761490                this->node = decl;
     1491
     1492                if ( Validate::dtorStruct == old ) {
     1493                        dtorStruct = decl;
     1494                }
    14771495        }
    14781496
  • src/Validate/FindSpecialDecls.cc

    r0aedb01 r043a5b6  
    2626namespace Validate {
    2727        Type * SizeType = nullptr;
    28   FunctionDecl * dereferenceOperator = nullptr;
    29   StructDecl * dtorStruct = nullptr;
    30   FunctionDecl * dtorStructDestroy = nullptr;
     28        FunctionDecl * dereferenceOperator = nullptr;
     29        StructDecl * dtorStruct = nullptr;
     30        FunctionDecl * dtorStructDestroy = nullptr;
    3131
    3232        namespace {
Note: See TracChangeset for help on using the changeset viewer.