[llvm-bugs] [Bug 35435] New: Member access to incomplete type from dllimport
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 27 07:23:58 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35435
Bug ID: 35435
Summary: Member access to incomplete type from dllimport
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: zahira.ammarguellat at intel.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
An explicit instantiation request should be ignored when it’s trying to
instantiate a dllimport class.
Reproducer:
class __declspec(dllimport) Edge;
template <class T>
class __declspec(dllimport) Range
{
void insert(T *obj) { obj->loc(); }
};
template void Range<Edge>::insert(Edge *);
ksh-3.2$ clang -c t1.cpp
t1.cpp:10:28: error: member access into incomplete type 'test1::Edge'
void insert(T *obj) { obj->loc(); }
^
t1.cpp:13:28: note: in instantiation of member function
'test1::Range<test1::Edge>::insert' requested here
template void Range<Edge>::insert(Edge *);
^
t1.cpp:5:29: note: forward declaration of 'test1::Edge'
class __declspec(dllimport) Edge;
^
t1.cpp:22:28: error: member access into incomplete type 'test2::Edge'
void insert(T* obj) { obj->loc(); }
^
t1.cpp:25:28: note: in instantiation of member function
'test2::Range<test2::Edge>::insert' requested here
template void Range<Edge>::insert(Edge *);
^
t1.cpp:17:29: note: forward declaration of 'test2::Edge'
class __declspec(dllexport) Edge;
^
2 errors generated.
--
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/20171127/fa8ea826/attachment.html>
More information about the llvm-bugs
mailing list