[PATCH] MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)

Reid Kleckner rnk at google.com
Mon Jun 23 17:13:30 PDT 2014

Does your code handle explicit template specializations with inconsistent DLL attributes?  I'm thinking of this test case:

  template <typename T> struct Foo { T get() { return {}; } };
  template <> struct __declspec(dllimport) Foo<int> { int get() { return 42; } };
  struct __declspec(dllexport) Bar : Foo<int> {
    int baz() { return Foo<int>::get(); }
  Bar b;

MSVC appears to import Foo<int>::get(), but if I understand your code correctly, it will diagnose this.


More information about the cfe-commits mailing list