Changeset 8d25360
- Timestamp:
- Feb 13, 2019, 12:24:12 PM (6 years ago)
- Branches:
- no_list
- Children:
- 80eefcb
- Parents:
- bbbc067
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
rbbbc067 r8d25360 94 94 template< typename SrcContainer, typename DestContainer > 95 95 void cloneAll( const SrcContainer &src, DestContainer &dest ) { 96 typename SrcContainer::const_iterator in = src.begin();97 std::back_insert_iterator< DestContainer > out( dest );98 while ( in != src.end() ) {99 *out++ = (*in++)->clone();100 } // while96 std::transform(src.begin(), src.end(), std::back_insert_iterator< DestContainer >( dest ), 97 [](const typename SrcContainer::value_type & t) -> typename DestContainer::value_type { 98 return t->clone(); 99 } 100 ); 101 101 } 102 102 … … 464 464 465 465 // ----------------------------------------------------------------------------- 466 /// Reorders the input range in-place so that the minimal-value elements according to the 467 /// comparator are in front; 466 /// Reorders the input range in-place so that the minimal-value elements according to the 467 /// comparator are in front; 468 468 /// returns the iterator after the last minimal-value element. 469 469 template<typename Iter, typename Compare> 470 470 Iter sort_mins( Iter begin, Iter end, Compare& lt ) { 471 471 if ( begin == end ) return end; 472 472 473 473 Iter min_pos = begin; 474 474 for ( Iter i = begin + 1; i != end; ++i ) { -
src/Parser/TypeData.cc
rbbbc067 r8d25360 887 887 888 888 889 NamedTypeDecl * buildSymbolic( const TypeData * td, std::vector< Attribute * >attributes, const string & name, Type::StorageClasses scs, LinkageSpec::Spec linkage ) {889 NamedTypeDecl * buildSymbolic( const TypeData * td, const std::vector< Attribute * > & attributes, const string & name, Type::StorageClasses scs, LinkageSpec::Spec linkage ) { 890 890 assert( td->kind == TypeData::Symbolic ); 891 891 NamedTypeDecl * ret; … … 947 947 948 948 949 Declaration * buildDecl( const TypeData * td, const string &name, Type::StorageClasses scs, Expression * bitfieldWidth, Type::FuncSpecifiers funcSpec, LinkageSpec::Spec linkage, Expression *asmName, Initializer * init, std::vector< Attribute * >attributes ) {949 Declaration * buildDecl( const TypeData * td, const string &name, Type::StorageClasses scs, Expression * bitfieldWidth, Type::FuncSpecifiers funcSpec, LinkageSpec::Spec linkage, Expression *asmName, Initializer * init, const std::vector< Attribute * > & attributes ) { 950 950 if ( td->kind == TypeData::Function ) { 951 951 if ( td->function.idList ) { // KR function ? -
src/Parser/TypeData.h
rbbbc067 r8d25360 130 130 TypeofType * buildTypeof( const TypeData * ); 131 131 Declaration * buildDecl( const TypeData *, const std::string &, Type::StorageClasses, Expression *, Type::FuncSpecifiers funcSpec, LinkageSpec::Spec, Expression * asmName, 132 Initializer * init = nullptr, std::vector< Attribute * >attributes = std::vector< Attribute * >() );132 Initializer * init = nullptr, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() ); 133 133 FunctionType * buildFunction( const TypeData * ); 134 134 void buildKRFunction( const TypeData::Function_t & function ); -
src/SymTab/Validate.cc
rbbbc067 r8d25360 913 913 if ( ! inFunctionType ) { 914 914 ret->attributes.insert( ret->attributes.end(), typeInst->attributes.begin(), typeInst->attributes.end() ); 915 typeInst->attributes.clear(); 915 916 } else { 916 917 deleteAll( ret->attributes );
Note: See TracChangeset
for help on using the changeset viewer.