Changes in src/InitTweak/GenInit.cc [68fe077a:615a096]
- File:
-
- 1 edited
-
src/InitTweak/GenInit.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/GenInit.cc
r68fe077a r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 08:01:25201713 // Update Count : 18 112 // Last Modified On : Fri Mar 17 09:12:36 2017 13 // Update Count : 183 14 14 // 15 15 … … 143 143 // is being returned 144 144 // Note: under the assumption that assignments return *this, checking for ?=? here is an optimization, since it shouldn't be necessary to copy construct `this`. This is a temporary optimization until reference types are added, at which point this should be removed, along with the analogous optimization in copy constructor generation. 145 if ( returnStmt->get_expr() && returnVals.size() == 1 && funcName != "?=?" && ! returnVals.front()->get_type()->get_ isLvalue() ) {145 if ( returnStmt->get_expr() && returnVals.size() == 1 && funcName != "?=?" && ! returnVals.front()->get_type()->get_lvalue() ) { 146 146 // explicitly construct the return value using the return expression and the retVal object 147 147 assertf( returnVals.front()->get_name() != "", "Function %s has unnamed return value\n", funcName.c_str() ); … … 195 195 196 196 ObjectDecl * arrayDimension = new ObjectDecl( dimensionName.newName(), storageClasses, LinkageSpec::C, 0, SymTab::SizeType->clone(), new SingleInit( arrayType->get_dimension() ) ); 197 arrayDimension->get_type()->set_ isConst( true );197 arrayDimension->get_type()->set_const( true ); 198 198 199 199 arrayType->set_dimension( new VariableExpr( arrayDimension ) ); … … 218 218 219 219 bool CtorDtor::isManaged( Type * type ) const { 220 // need to clear and reset qualifiers when determining if a type is managed 221 ValueGuard< Type::Qualifiers > qualifiers( type->get_qualifiers() ); 222 type->get_qualifiers() = Type::Qualifiers(); 220 223 if ( TupleType * tupleType = dynamic_cast< TupleType * > ( type ) ) { 221 224 // tuple is also managed if any of its components are managed
Note:
See TracChangeset
for help on using the changeset viewer.