Changeset 6fc5c14
- Timestamp:
- Oct 19, 2017, 11:15:35 AM (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:
- ab4bff5
- Parents:
- 447c356
- git-author:
- Rob Schluntz <rschlunt@…> (10/17/17 10:26:33)
- git-committer:
- Rob Schluntz <rschlunt@…> (10/19/17 11:15:35)
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r447c356 r6fc5c14 353 353 assert( expr ); 354 354 if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( expr ) ) { 355 return varExpr-> get_var();355 return varExpr->var; 356 356 } else if ( MemberExpr * memberExpr = dynamic_cast< MemberExpr * >( expr ) ) { 357 return memberExpr-> get_member();357 return memberExpr->member; 358 358 } else if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) { 359 return getCalledFunction( castExpr-> get_arg());359 return getCalledFunction( castExpr->arg ); 360 360 } else if ( UntypedExpr * untypedExpr = dynamic_cast< UntypedExpr * >( expr ) ) { 361 361 return handleDerefCalledFunction( untypedExpr ); … … 363 363 return handleDerefCalledFunction( appExpr ); 364 364 } else if ( AddressExpr * addrExpr = dynamic_cast< AddressExpr * >( expr ) ) { 365 return getCalledFunction( addrExpr->get_arg() ); 365 return getCalledFunction( addrExpr->arg ); 366 } else if ( CommaExpr * commaExpr = dynamic_cast< CommaExpr * >( expr ) ) { 367 return getCalledFunction( commaExpr->arg2 ); 366 368 } 367 369 return nullptr; -
src/SymTab/Autogen.cc
r447c356 r6fc5c14 379 379 // don't make a function whose parameter is an unnamed bitfield 380 380 continue; 381 } else if ( ! InitTweak::isConstructable( field->get_type() ) ) { 382 continue; 381 383 } 382 384 memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, 0, field->get_type()->clone(), 0 ) ); … … 407 409 } 408 410 409 if ( type->get_const() && func->get_name() == "?=?") {411 if ( type->get_const() && CodeGen::isAssignment( func->name ) ) { 410 412 // don't assign const members, but do construct/destruct 413 continue; 414 } else if ( CodeGen::isCtorDtor( func->name ) && ! InitTweak::isConstructable( type ) ) { 415 // don't construct non-constructable types 411 416 continue; 412 417 } … … 441 446 if ( isUnnamedBitfield( dynamic_cast< ObjectDecl * > ( field ) ) ) { 442 447 // don't make a function whose parameter is an unnamed bitfield 448 continue; 449 } else if ( ! InitTweak::isConstructable( field->get_type() ) ) { 450 // don't construct non-constructable types 443 451 continue; 444 452 } else if ( parameter != params.end() ) { -
src/SymTab/Indexer.cc
r447c356 r6fc5c14 407 407 makeWritable(); 408 408 409 const std::string &name = decl-> get_name();409 const std::string &name = decl->name; 410 410 std::string mangleName; 411 if ( LinkageSpec::isOverridable( decl-> get_linkage()) ) {411 if ( LinkageSpec::isOverridable( decl->linkage ) ) { 412 412 // mangle the name without including the appropriate suffix, so overridable routines are placed into the 413 413 // same "bucket" as their user defined versions. … … 418 418 419 419 // this ensures that no two declarations with the same unmangled name at the same scope both have C linkage 420 if ( ! LinkageSpec::isMangled( decl-> get_linkage()) ) {420 if ( ! LinkageSpec::isMangled( decl->linkage ) ) { 421 421 // NOTE this is broken in Richard's original code in such a way that it never triggers (it 422 422 // doesn't check decls that have the same manglename, and all C-linkage decls are defined to
Note: See TracChangeset
for help on using the changeset viewer.