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: unassignedclangb...@nondot.org
Reporter: jva...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs