EHStack.pushCleanup<CallCoroDelete>(NormalAndEHCleanup, S.getDeallocate());
// Create mapping between parameters and copy-params for coroutine function.
- auto ParamMoves = S.getParamMoves();
+ llvm::ArrayRef<const Stmt *> ParamMoves = S.getParamMoves();
assert(
(ParamMoves.size() == 0 || (ParamMoves.size() == FnArgs.size())) &&
"ParamMoves and FnArgs should be the same size for coroutine function");
}
CGM.Error(E->getBeginLoc(), "this builtin expect that __builtin_coro_begin "
"has been used earlier in this function");
- auto NullPtr = llvm::ConstantPointerNull::get(Builder.getInt8PtrTy());
+ auto *NullPtr = llvm::ConstantPointerNull::get(Builder.getInt8PtrTy());
return RValue::get(NullPtr);
}
case llvm::Intrinsic::coro_size: {
auto &Context = getContext();
- auto SizeTy = Context.getSizeType();
- auto T = Builder.getIntNTy(Context.getTypeSize(SizeTy));
+ CanQualType SizeTy = Context.getSizeType();
+ llvm::IntegerType *T = Builder.getIntNTy(Context.getTypeSize(SizeTy));
llvm::Function *F = CGM.getIntrinsic(llvm::Intrinsic::coro_size, T);
return RValue::get(Builder.CreateCall(F));
}
// [dcl.fct.def.coroutine]p13
// The initialization and destruction of each parameter copy occurs in the
// context of the called coroutine.
- auto D = buildVarDecl(*this, Loc, PD->getType(), PD->getIdentifier());
+ auto *D = buildVarDecl(*this, Loc, PD->getType(), PD->getIdentifier());
AddInitializerToDecl(D, CExpr, /*DirectInit=*/true);
// Convert decl to a statement.
// discovered.
// TODO: Become stricter when <experimental/coroutine> is removed.
- auto const &TraitIdent = PP.getIdentifierTable().get("coroutine_traits");
+ IdentifierInfo const &TraitIdent =
+ PP.getIdentifierTable().get("coroutine_traits");
NamespaceDecl *StdSpace = getStdNamespace();
LookupResult ResStd(*this, &TraitIdent, FuncLoc, LookupOrdinaryName);
}
// Prefer ::std to std::experimental.
- auto &Result = InStd ? ResStd : ResExp;
+ LookupResult &Result = InStd ? ResStd : ResExp;
CoroTraitsNamespaceCache = InStd ? StdSpace : ExpSpace;
// coroutine_traits is required to be a class template.
Diag(KwLoc, diag::warn_deprecated_coroutine_namespace)
<< "coroutine_traits";
ResExp.suppressDiagnostics();
- auto *Found = *ResExp.begin();
+ NamedDecl *Found = *ResExp.begin();
Diag(Found->getLocation(), diag::note_entity_declared_at) << Found;
if (InStd &&