Changeset cd7ef0b for src/SymTab/Validate.cc
- Timestamp:
- Aug 10, 2017, 3:39:11 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 38d70ab
- Parents:
- 275f4b4 (diff), e1780a2 (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
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r275f4b4 rcd7ef0b 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T hu Mar 30 16:50:13201713 // Update Count : 35 711 // Last Modified By : Andrew Beach 12 // Last Modified On : Tus Aug 8 13:27:00 2017 13 // Update Count : 358 14 14 // 15 15 … … 686 686 Type *designatorType = tyDecl->get_base()->stripDeclarator(); 687 687 if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( designatorType ) ) { 688 return new StructDecl( aggDecl->get_name() );688 return new StructDecl( aggDecl->get_name(), DeclarationNode::Struct, noAttributes, tyDecl->get_linkage() ); 689 689 } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( designatorType ) ) { 690 return new UnionDecl( aggDecl->get_name() );690 return new UnionDecl( aggDecl->get_name(), noAttributes, tyDecl->get_linkage() ); 691 691 } else if ( EnumInstType *enumDecl = dynamic_cast< EnumInstType * >( designatorType ) ) { 692 return new EnumDecl( enumDecl->get_name() );692 return new EnumDecl( enumDecl->get_name(), noAttributes, tyDecl->get_linkage() ); 693 693 } else { 694 694 return ret->clone(); … … 783 783 type = new EnumInstType( Type::Qualifiers(), newDeclEnumDecl->get_name() ); 784 784 } // if 785 TypedefDeclPtr tyDecl( new TypedefDecl( aggDecl->get_name(), Type::StorageClasses(), type ) );785 TypedefDeclPtr tyDecl( new TypedefDecl( aggDecl->get_name(), Type::StorageClasses(), type, aggDecl->get_linkage() ) ); 786 786 typedefNames[ aggDecl->get_name() ] = std::make_pair( std::move( tyDecl ), scopeLevel ); 787 787 } // if … … 903 903 FunctionType * ftype = functionDecl->get_functionType(); 904 904 std::list< DeclarationWithType * > & retVals = ftype->get_returnVals(); 905 assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: % d", functionDecl->get_name().c_str(), retVals.size() );905 assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %zu", functionDecl->get_name().c_str(), retVals.size() ); 906 906 if ( retVals.size() == 1 ) { 907 907 // ensure all function return values have a name - use the name of the function to disambiguate (this also provides a nice bit of help for debugging).
Note:
See TracChangeset
for help on using the changeset viewer.