Changes in src/Parser/DeclarationNode.cc [6ef2d81:c0aa336]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r6ef2d81 rc0aa336 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 9 15:54:59 201713 // Update Count : 7 4212 // Last Modified On : Mon Feb 6 16:01:29 2017 13 // Update Count : 739 14 14 // 15 15 … … 56 56 asmName( nullptr ), 57 57 initializer( nullptr ), 58 extension( false ), 59 asmStmt( nullptr ) { 58 extension( false ) { 60 59 61 60 // variable.name = nullptr; … … 78 77 delete type; 79 78 delete bitfieldWidth; 80 81 delete asmStmt;82 79 // asmName, no delete, passed to next stage 83 80 delete initializer; … … 101 98 newnode->initializer = maybeClone( initializer ); 102 99 newnode->extension = extension; 103 newnode->asmStmt = maybeClone( asmStmt );104 100 newnode->error = error; 105 101 … … 418 414 } 419 415 420 DeclarationNode * DeclarationNode::newAsmStmt( StatementNode * stmt ) {421 DeclarationNode * newnode = new DeclarationNode;422 newnode->asmStmt = stmt;423 return newnode;424 }425 426 416 void appendError( string & dst, const string & src ) { 427 417 if ( src.empty() ) return; … … 505 495 return this; 506 496 } // if 497 498 checkQualifiers( q->type, type ); 499 addQualifiersToType( q->type, type ); 507 500 508 501 if ( q->type->forall ) { … … 520 513 q->type->forall = nullptr; 521 514 } // if 522 523 checkQualifiers( q->type, type );524 addQualifiersToType( q->type, type );525 526 515 delete q; 527 516 return this; … … 991 980 Declaration * DeclarationNode::build() const { 992 981 if ( ! error.empty() ) throw SemanticError( error + " in declaration of ", this ); 993 994 if ( asmStmt ) {995 return new AsmDecl( safe_dynamic_cast<AsmStmt *>( asmStmt->build() ) );996 } // if997 982 998 983 // if ( variable.name ) {
Note:
See TracChangeset
for help on using the changeset viewer.