[llvm-bugs] [Bug 34983] New: [coroutines] diagnostics for missing coroutine promise members produce invalid typo corrections
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 17 11:52:12 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34983
Bug ID: 34983
Summary: [coroutines] diagnostics for missing coroutine promise
members produce invalid typo corrections
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, gornishanov at gmail.com,
llvm-bugs at lists.llvm.org
Testcase:
#include <experimental/coroutine>
namespace std { using namespace std::experimental; }
struct corotype {
struct promise_type {
std::suspend_always initial_suspend();
};
};
static corotype f() {
}
void h();
corotype g() {
auto a = f();
while (co_await a) h();
}
Produces this wrong typo correction:
<stdin>:12:10: error: no member named 'final_suspend' in
'corotype::promise_type'; did you mean 'initial_suspend'?
corotype g() {
^
initial_suspend
<stdin>:6:25: note: 'initial_suspend' declared here
std::suspend_always initial_suspend();
^
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171017/ca7af2b4/attachment.html>
More information about the llvm-bugs
mailing list