[llvm-bugs] [Bug 43216] New: Unclear error message
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 4 00:47:15 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43216
Bug ID: 43216
Summary: Unclear error message
Product: clang
Version: 9.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: jvapen at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
F:\Other\Software\LLVM_9_0_0-RC3\bin\clang-cl.exe /nologo /c -w /GR /EHsc
/std:c++17 t.cpp
template <typename T> auto f(T &&) {
[]() {
struct G {
~G() {
if (i)
++i;
}
int i{0};
};
G{};
};
}
auto g() { return f(0); }
>> t.cpp(5,13): error: 'f(int &&)::(anonymous class)::operator()()::G::~G()::G::i' is not a member of class 'G'
if (i)
^
t.cpp(3,12): note: in instantiation of member function 'f(int &&)::(anonymous
class)::operator()()::G::~G' requested here
struct G {
^
1 error generated.
As one can see in the code above, `i` is a member of the class G.
Linked bug: 43215 (Crash on slightly more complex code)
--
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/20190904/b123465e/attachment-0001.html>
More information about the llvm-bugs
mailing list