Changes in src/Parser/DeclarationNode.cc [42107b4:af9da5f]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r42107b4 raf9da5f 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 20 22:37:20201813 // Update Count : 10 6312 // Last Modified On : Wed May 16 09:37:17 2018 13 // Update Count : 1070 14 14 // 15 15 … … 93 93 94 94 delete assert.condition; 95 delete assert.message; 95 96 } 96 97 … … 526 527 527 528 DeclarationNode * DeclarationNode::addQualifiers( DeclarationNode * q ) { 528 if ( ! q ) { delete q; return this; }// empty qualifier529 if ( ! q ) { return this; } // empty qualifier 529 530 530 531 checkSpecifiers( q ); … … 560 561 561 562 checkQualifiers( type, q->type ); 562 if ( (builtin == Zero || builtin == One) && error.length() == 0 ) {563 if ( (builtin == Zero || builtin == One) && q->type->qualifiers.val != 0 && error.length() == 0 ) { 563 564 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 || TypeData::Reference );784 assert( p->type->kind == TypeData::Pointer || p->type->kind == 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; 1010 1011 } else if ( UnionDecl * agg = dynamic_cast< UnionDecl * >( decl ) ) { 1011 1012 UnionInstType * inst = new UnionInstType( Type::Qualifiers(), agg->get_name() );
Note:
See TracChangeset
for help on using the changeset viewer.