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: unassignedclangb...@nondot.org
Reporter: zahira.ammarguel...@intel.com
CC: dgre...@apple.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs