Changes in src/Parser/DeclarationNode.cc [af9da5f:42107b4]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
raf9da5f r42107b4 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 16 09:37:17201813 // Update Count : 10 7012 // Last Modified On : Fri Apr 20 22:37:20 2018 13 // Update Count : 1063 14 14 // 15 15 … … 93 93 94 94 delete assert.condition; 95 delete assert.message;96 95 } 97 96 … … 527 526 528 527 DeclarationNode * DeclarationNode::addQualifiers( DeclarationNode * q ) { 529 if ( ! q ) { return this; }// empty qualifier528 if ( ! q ) { delete q; return this; } // empty qualifier 530 529 531 530 checkSpecifiers( q ); … … 561 560 562 561 checkQualifiers( type, q->type ); 563 if ( (builtin == Zero || builtin == One) && q->type->qualifiers.val != 0 &&error.length() == 0 ) {562 if ( (builtin == Zero || builtin == One) && error.length() == 0 ) { 564 563 SemanticWarning( yylloc, Warning::BadQualifiersZeroOne, Type::QualifiersNames[ilog2( q->type->qualifiers.val )], builtinTypeNames[builtin] ); 564 // appendError( error, string( "questionable qualifiers" ) ); 565 565 } // if 566 566 addQualifiersToType( q->type, type ); … … 782 782 DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) { 783 783 if ( p ) { 784 assert( p->type->kind == TypeData::Pointer || p->type->kind ==TypeData::Reference );784 assert( p->type->kind == TypeData::Pointer || TypeData::Reference ); 785 785 setBase( p->type ); 786 786 p->type = nullptr; … … 1008 1008 obj->location = cur->location; 1009 1009 * out++ = obj; 1010 delete agg;1011 1010 } else if ( UnionDecl * agg = dynamic_cast< UnionDecl * >( decl ) ) { 1012 1011 UnionInstType * inst = new UnionInstType( Type::Qualifiers(), agg->get_name() );
Note:
See TracChangeset
for help on using the changeset viewer.