Builder.CreateStore(EmitScalarExpr(Init), NewPtr);
else if (AllocType->isAnyComplexType())
EmitComplexExprIntoAddr(Init, NewPtr, AllocType.isVolatileQualified());
- else {
- ErrorUnsupported(E, "new expression");
- return llvm::UndefValue::get(ConvertType(E->getType()));
- }
+ else
+ EmitAggExpr(Init, NewPtr, AllocType.isVolatileQualified());
}
return NewPtr;
int* b = new (a) int;
}
+struct S {
+ int a;
+};
+
void t3() {
int *a = new int(10);
_Complex int* b = new _Complex int(10i);
+ S s;
+ s.a = 10;
+ S *sp = new S(s);
}