Add error messages for missing methods of awaitable class
authorJunMa <JunMa@linux.alibaba.com>
Thu, 21 Nov 2019 00:51:22 +0000 (08:51 +0800)
committerJunMa <JunMa@linux.alibaba.com>
Wed, 22 Jan 2020 06:35:09 +0000 (14:35 +0800)
commitc75199b716ed54638ce8949d0f1f4ef71c0b31a5
tree40a9355ad0060d55061b871f104fdd19f2765124
parent105028315816eb4c8d7b16c79e25775afc656c9a
Add error messages for missing methods of awaitable class

gcc/cp/ChangeLog
         * coroutines.cc (lookup_awaitable_member): Lookup an awaitable member.
         (lookup_promise_method): Emit diagnostic when get NULL_TREE back only.
         (build_co_await): Use lookup_awaitable_member instead of lookup_member.

gcc/testsuite/ChangeLog
         * g++.dg/coroutines/coro1-missing-await-method.C: New test.
gcc/cp/ChangeLog
gcc/cp/coroutines.cc
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/coroutines/coro1-missing-await-method.C [new file with mode: 0644]
gcc/testsuite/g++.dg/coroutines/coro1-ret-int-yield-int.h