[PATCH] D33625: [coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing conversions.

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 27 22:54:05 PDT 2017


EricWF created this revision.

The expression `await_ready` is required to be contextually convertible to bool and `await_suspend` must be a prvalue of either `void` or `bool`.
This patch adds diagnostics for when those requirements are violated.

It also correctly performs the contextual conversion to bool on the result of `await_ready`


https://reviews.llvm.org/D33625

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/Sema/SemaCoroutine.cpp
  test/SemaCXX/coroutines.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33625.100540.patch
Type: text/x-patch
Size: 4714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170528/26dfe7ff/attachment-0001.bin>


More information about the cfe-commits mailing list