forked from OSchip/llvm-project
Work around incomplete list initialization support in older MSVC.
llvm-svn: 251391
This commit is contained in:
parent
e1194bdb4f
commit
c75f0e8f4a
|
@ -4040,16 +4040,29 @@ public:
|
|||
Resume->isValueDependent(),
|
||||
Operand->isInstantiationDependent(),
|
||||
Operand->containsUnexpandedParameterPack()),
|
||||
CoawaitLoc(CoawaitLoc),
|
||||
SubExprs{Operand, Ready, Suspend, Resume} {}
|
||||
CoawaitLoc(CoawaitLoc) {
|
||||
SubExprs[CoawaitExpr::Operand] = Operand;
|
||||
SubExprs[CoawaitExpr::Ready] = Ready;
|
||||
SubExprs[CoawaitExpr::Suspend] = Suspend;
|
||||
SubExprs[CoawaitExpr::Resume] = Resume;
|
||||
}
|
||||
CoawaitExpr(SourceLocation CoawaitLoc, QualType Ty, Expr *Operand)
|
||||
: Expr(CoawaitExprClass, Ty, VK_RValue, OK_Ordinary,
|
||||
true, true, true, Operand->containsUnexpandedParameterPack()),
|
||||
CoawaitLoc(CoawaitLoc), SubExprs{Operand} {
|
||||
CoawaitLoc(CoawaitLoc) {
|
||||
assert(Operand->isTypeDependent() && Ty->isDependentType() &&
|
||||
"wrong constructor for non-dependent co_await expression");
|
||||
SubExprs[CoawaitExpr::Operand] = Operand;
|
||||
SubExprs[CoawaitExpr::Ready] = nullptr;
|
||||
SubExprs[CoawaitExpr::Suspend] = nullptr;
|
||||
SubExprs[CoawaitExpr::Resume] = nullptr;
|
||||
}
|
||||
CoawaitExpr(EmptyShell Empty) : Expr(CoawaitExprClass, Empty) {
|
||||
SubExprs[CoawaitExpr::Operand] = nullptr;
|
||||
SubExprs[CoawaitExpr::Ready] = nullptr;
|
||||
SubExprs[CoawaitExpr::Suspend] = nullptr;
|
||||
SubExprs[CoawaitExpr::Resume] = nullptr;
|
||||
}
|
||||
CoawaitExpr(EmptyShell Empty) : Expr(CoawaitExprClass, Empty) {}
|
||||
|
||||
SourceLocation getKeywordLoc() const { return CoawaitLoc; }
|
||||
Expr *getOperand() const {
|
||||
|
|
|
@ -298,7 +298,9 @@ class CoroutineBodyStmt : public Stmt {
|
|||
friend class ASTStmtReader;
|
||||
public:
|
||||
CoroutineBodyStmt(Stmt *Body)
|
||||
: Stmt(CoroutineBodyStmtClass), SubStmts{Body} {}
|
||||
: Stmt(CoroutineBodyStmtClass) {
|
||||
SubStmts[CoroutineBodyStmt::Body] = Body;
|
||||
}
|
||||
|
||||
/// \brief Retrieve the body of the coroutine as written. This will be either
|
||||
/// a CompoundStmt or a TryStmt.
|
||||
|
|
Loading…
Reference in New Issue