Changeset 4a7d895 for src/Parser/TypeData.cc
- Timestamp:
- Aug 20, 2016, 5:33:07 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 80722d0
- Parents:
- 7b1bfc5 (diff), 2037f82 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
src/Parser/TypeData.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r7b1bfc5 r4a7d895 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 13 18:38:41201613 // Update Count : 5912 // Last Modified On : Thu Aug 18 23:48:44 2016 13 // Update Count : 64 14 14 // 15 15 … … 182 182 break; 183 183 case Array: 184 //PAB newtype->array->dimension = maybeClone( array->dimension );185 184 newtype->array->dimension = array->dimension; 186 185 newtype->array->isVarLen = array->isVarLen; … … 479 478 } 480 479 481 Declaration *TypeData::buildDecl( std::string name, DeclarationNode::StorageClass sc, Expression *bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec:: Typelinkage, Initializer *init ) const {480 Declaration *TypeData::buildDecl( std::string name, DeclarationNode::StorageClass sc, Expression *bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, Initializer *init ) const { 482 481 if ( kind == TypeData::Function ) { 483 482 FunctionDecl *decl; … … 489 488 decl = new FunctionDecl( name, sc, linkage, buildFunction(), body, isInline, isNoreturn ); 490 489 } else { 491 // std::list< Label> ls;492 decl = new FunctionDecl( name, sc, linkage, buildFunction(), new CompoundStmt( std::list< Label>() ), isInline, isNoreturn );490 // std::list< Label > ls; 491 decl = new FunctionDecl( name, sc, linkage, buildFunction(), new CompoundStmt( std::list< Label >() ), isInline, isNoreturn ); 493 492 } // if 494 493 } else { … … 909 908 buildList( enumeration->constants, ret->get_members() ); 910 909 std::list< Declaration * >::iterator members = ret->get_members().begin(); 911 for ( const DeclarationNode *cur = enumeration->constants; cur != NULL; cur = dynamic_cast<DeclarationNode *>( cur->get_next() ), ++members ) {912 if ( cur->get_enumeratorValue() != NULL) {913 ObjectDecl *member = dynamic_cast< ObjectDecl *>(*members);910 for ( const DeclarationNode *cur = enumeration->constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) { 911 if ( cur->get_enumeratorValue() != nullptr ) { 912 ObjectDecl *member = dynamic_cast< ObjectDecl * >(*members); 914 913 member->set_init( new SingleInit( maybeBuild< Expression >( cur->get_enumeratorValue() ), std::list< Expression * >() ) ); 915 914 } // if
Note:
See TracChangeset
for help on using the changeset viewer.