static ABIArgInfo classifyReturnType(QualType RetTy,
ASTContext &Context) {
+ assert(!RetTy->isArrayType() &&
+ "Array types cannot be passed directly.");
if (CodeGenFunction::hasAggregateLLVMType(RetTy)) {
uint64_t Size = Context.getTypeSize(RetTy);
if (Size == 8) {
for (++begin; begin != end; ++begin) {
const llvm::Type *Ty = ConvertType(*begin);
+ assert(!(*begin)->isArrayType() &&
+ "Array types cannot be passed directly.");
if (Ty->isSingleValueType())
ArgTys.push_back(Ty);
else
for (++begin; begin != end; ++begin, ++Index) {
QualType ParamType = *begin;
unsigned ParamAttrs = 0;
+ assert(!ParamType->isArrayType() &&
+ "Array types cannot be passed directly.");
if (ParamType->isRecordType())
ParamAttrs |= llvm::ParamAttr::ByVal;
if (ParamType->isPromotableIntegerType()) {
QualType &ReturnType) {
unsigned NumArgs = Sel.getNumArgs();
if (!Method) {
+ // Apply default argument promotion as for (C99 6.5.2.2p6).
+ for (unsigned i = 0; i != NumArgs; i++)
+ DefaultArgumentPromotion(Args[i]);
+
Diag(lbrac, diag::warn_method_not_found, std::string(PrefixStr),
Sel.getName(), SourceRange(lbrac, rbrac));
ReturnType = Context.getObjCIdType();