EricWF marked an inline comment as done. EricWF added inline comments.
================ Comment at: lib/Sema/SemaCoroutine.cpp:393 + // - await-suspend is the expression e.await_suspend(h), which shall be + // a prvalue of type void or bool. + QualType RetType = AwaitSuspend->getType(); ---------------- rsmith wrote: > It looks like you're not checking the 'prvalue' part of this. I thought so too. I'll add tests to make sure it's being handled correctly. The following test should expose a lack of checking for `prvalues`, right? ``` template <class BoolTy> struct TestAwait { bool await_ready(); template <class F> BoolTy await_suspend(F); // expected-error void await_resume(); }; void test() { co_await TestAwait<bool&&>{}; co_await TestAwait<bool&>{}; } ``` https://reviews.llvm.org/D33625 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits