https://bugs.llvm.org/show_bug.cgi?id=34982
Bug ID: 34982
Summary: [coroutines] assertion failure diagnosing bad
coroutine await_suspend function
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: gornisha...@gmail.com
Reporter: richard-l...@metafoo.co.uk
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
Testcase:
#include <experimental/coroutine>
namespace std { using namespace std::experimental; }
struct corotype {
struct promise_type {
std::suspend_always initial_suspend();
std::suspend_always final_suspend();
};
bool await_ready() { return false; }
void await_suspend();
};
static corotype f() {
}
void h();
corotype g() {
auto a = f();
while (co_await a) h();
}
Results in an assertion failure when diagnosing the bad await_suspend function:
<stdin>:17:10: error: too many arguments to function call, expected 0, have 1
clang-6.0:
/usr/local/google/home/richardsmith/build/llvm-2/src/tools/clang/lib/Frontend/TextDiagnostic.cpp:1015:
void highlightRange(const clang::CharSourceRange &, unsigned int,
clang::FileID, const (anonymous namespace)::SourceColumnMap &, std::string &,
const clang::SourceManager &, const clang::LangOptions &): Assertion
`StartColNo <= EndColNo && "Invalid range!"' failed.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs