Changes in src/Parser/DeclarationNode.cc [e3e16bc:d180746]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
re3e16bc rd180746 14 14 // 15 15 16 #include <cassert> // for assert, assertf, s trict_dynamic_cast16 #include <cassert> // for assert, assertf, safe_dynamic_cast 17 17 #include <iterator> // for back_insert_iterator 18 18 #include <list> // for list … … 340 340 } // DeclarationNode::newTypeDecl 341 341 342 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers , OperKinds kind) {343 DeclarationNode * newnode = new DeclarationNode; 344 newnode->type = new TypeData( kind == OperKinds::PointTo ? TypeData::Pointer : TypeData::Reference);342 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) { 343 DeclarationNode * newnode = new DeclarationNode; 344 newnode->type = new TypeData( TypeData::Pointer ); 345 345 if ( qualifiers ) { 346 346 return newnode->addQualifiers( qualifiers ); … … 759 759 DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) { 760 760 if ( p ) { 761 assert( p->type->kind == TypeData::Pointer || TypeData::Reference);761 assert( p->type->kind == TypeData::Pointer ); 762 762 setBase( p->type ); 763 763 p->type = nullptr; … … 781 781 DeclarationNode * DeclarationNode::addNewPointer( DeclarationNode * p ) { 782 782 if ( p ) { 783 assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference);783 assert( p->type->kind == TypeData::Pointer ); 784 784 if ( type ) { 785 785 switch ( type->kind ) { … … 1027 1027 1028 1028 if ( asmStmt ) { 1029 return new AsmDecl( s trict_dynamic_cast<AsmStmt *>( asmStmt->build() ) );1029 return new AsmDecl( safe_dynamic_cast<AsmStmt *>( asmStmt->build() ) ); 1030 1030 } // if 1031 1031
Note:
See TracChangeset
for help on using the changeset viewer.