Fix unused expression warning in co_await.
authorEric Fiselier <eric@efcs.ca>
Tue, 27 Mar 2018 00:58:16 +0000 (00:58 +0000)
committerEric Fiselier <eric@efcs.ca>
Tue, 27 Mar 2018 00:58:16 +0000 (00:58 +0000)
commit16269a83ecbe9ec1c970ce161c5d609649b73af0
tree7265a3e89ef0ec80f3907609c7b2592ebcf050e9
parent15f7df9f44480282cf1d624ee88dceed6dc9a4fe
Fix unused expression warning in co_await.

Previously, anytime the result of the resume expression in
operator co_await was unused, a warning was generated. This
patch fixes the issue by only generating the unused result warning
if calling `await_resume()` would also generate a warning.

llvm-svn: 328602
clang/lib/AST/Expr.cpp
clang/test/SemaCXX/coroutines.cpp