summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprClassification.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-06-15 19:43:36 +0000
committerEric Fiselier <eric@efcs.ca>2017-06-15 19:43:36 +0000
commitcddaf8728fd2786bf3af3a81814c2fe2b13d8692 (patch)
tree1d69077933feed592a58949d2fd371a7c4e4bef9 /clang/lib/AST/ExprClassification.cpp
parentb560fdf3b84e18e3fb19d12cb2bd610dc2316118 (diff)
downloadbcm5719-llvm-cddaf8728fd2786bf3af3a81814c2fe2b13d8692.tar.gz
bcm5719-llvm-cddaf8728fd2786bf3af3a81814c2fe2b13d8692.zip
[coroutines] Allow co_await and co_yield expressions that return an lvalue to compile
Summary: The title says it all. Reviewers: GorNishanov, rsmith Reviewed By: GorNishanov Subscribers: rjmccall, cfe-commits Differential Revision: https://reviews.llvm.org/D34194 llvm-svn: 305496
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r--clang/lib/AST/ExprClassification.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp
index c035a42439a..d149bdd0cdf 100644
--- a/clang/lib/AST/ExprClassification.cpp
+++ b/clang/lib/AST/ExprClassification.cpp
@@ -190,7 +190,6 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) {
case Expr::ArrayInitIndexExprClass:
case Expr::NoInitExprClass:
case Expr::DesignatedInitUpdateExprClass:
- case Expr::CoyieldExprClass:
return Cl::CL_PRValue;
// Next come the complicated cases.
@@ -414,7 +413,8 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) {
return ClassifyInternal(Ctx, cast<InitListExpr>(E)->getInit(0));
case Expr::CoawaitExprClass:
- return ClassifyInternal(Ctx, cast<CoawaitExpr>(E)->getResumeExpr());
+ case Expr::CoyieldExprClass:
+ return ClassifyInternal(Ctx, cast<CoroutineSuspendExpr>(E)->getResumeExpr());
}
llvm_unreachable("unhandled expression kind in classification");
OpenPOWER on IntegriCloud