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