[coroutines] Fix unused warning on result of co_yield.
This patch follows up on r328602, which fixed the spurious unused
result warning for `co_await`.
llvm-svn: 328607
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 3cb0013..57c8850 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -2050,7 +2050,8 @@
return cast<GenericSelectionExpr>(this)->getResultExpr()->
isUnusedResultAWarning(WarnE, Loc, R1, R2, Ctx);
case CoawaitExprClass:
- return cast<CoawaitExpr>(this)->getResumeExpr()->
+ case CoyieldExprClass:
+ return cast<CoroutineSuspendExpr>(this)->getResumeExpr()->
isUnusedResultAWarning(WarnE, Loc, R1, R2, Ctx);
case ChooseExprClass:
return cast<ChooseExpr>(this)->getChosenSubExpr()->