Sema: delay the DLL exported member referencing
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 3 Dec 2016 01:57:47 +0000 (01:57 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 3 Dec 2016 01:57:47 +0000 (01:57 +0000)
commit25dbdfa0ac846b13eb2ab5ac1a026b3e5752b04f
tree3d2a669bebfe11ba8b0d8e38e1612c42b318ffd9
parent584042981d729e61cb3ebdbe7608ebb1538d59b8
Sema: delay the DLL exported member referencing

An explicit template specialization can cause the implicit template
specialization of a type which inherits the attributes.  In such a case, we
would end up with a delayed template specialization for a dll exported type
which we would fail to reference.  This would trigger an assertion.

We now propagate the dll storage attributes through the inheritance
chain.  Only after having done so do we reference the delayed template
specializations.  This allows any implicit specializations which inherit dll
storage to also be referenced.

llvm-svn: 288570
clang/lib/Sema/SemaTemplate.cpp
clang/test/CodeGenCXX/windows-implicit-dllexport-template-specialization.cpp [new file with mode: 0644]