[llvm-bugs] [Bug 30937] New: Can't find pure virtual function after r285954
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 7 14:28:38 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=30937
Bug ID: 30937
Summary: Can't find pure virtual function after r285954
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: dmajor at mozilla.com
CC: llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
Classification: Unclassified
$ cat test.cpp
struct NormalizedConstraintSet
{
struct BaseRange
{
virtual void FinalizeMerge() = 0;
};
struct StringRange : public BaseRange
{
void FinalizeMerge() override {}
};
NormalizedConstraintSet();
};
NormalizedConstraintSet::NormalizedConstraintSet()
{
typedef BaseRange NormalizedConstraintSet::* MemberPtrType;
MemberPtrType list[42];
for (auto& memberPtr : list) {
(this->*memberPtr).FinalizeMerge();
}
}
int main()
{
return 0;
}
$ clang-cl test.cpp
test-24ac86.obj : error LNK2019: unresolved external symbol "public: virtual
void __cdecl NormalizedConstraintSet::BaseRange::FinalizeMerge(void)"
(?FinalizeMerge at BaseRange@NormalizedConstraintSet@@UEAAXXZ) referenced in
function "public: __cdecl
NormalizedConstraintSet::NormalizedConstraintSet(void)"
(??0NormalizedConstraintSet@@QEAA at XZ)
test.exe : fatal error LNK1120: 1 unresolved externals
clang-cl.exe: error: linker command failed with exit code 1120 (use -v to see
invocation)
(This test.cpp was reduced from the Firefox codebase. For real-world usage
please see https://dxr.mozilla.org/mozilla-central/search?q=FinalizeMerge)
--
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/20161107/a3b0c9a9/attachment-0001.html>
More information about the llvm-bugs
mailing list