An initialization does not alias.

llvm-svn: 138624
This commit is contained in:
John McCall 2011-08-26 05:38:08 +00:00
parent c66d50d1a2
commit a8a39bc346
2 changed files with 6 additions and 1 deletions

View File

@ -138,7 +138,8 @@ void CodeGenFunction::EmitAnyExprToMem(const Expr *E,
else if (hasAggregateLLVMType(E->getType()))
EmitAggExpr(E, AggValueSlot::forAddr(Location, Quals,
AggValueSlot::IsDestructed_t(IsInit),
AggValueSlot::DoesNotNeedGCBarriers));
AggValueSlot::DoesNotNeedGCBarriers,
AggValueSlot::IsAliased_t(!IsInit)));
else {
RValue RV = RValue::get(EmitScalarExpr(E, /*Ignore*/ false));
LValue LV = MakeAddrLValue(Location, E->getType());

View File

@ -394,7 +394,11 @@ namespace test7 {
// Just don't crash.
namespace test8 {
struct A {
// Having both of these is required to trigger the assert we're
// trying to avoid.
A(const A&);
A&operator=(const A&);
~A();
};