Extended Description
Consider:
template <typename T> void f() {}
void foo() { f<int>(); }
template void __declspec(dllimport) f<int>();
or
template <typename T> struct S { void f() {} };
void bar(S<int> s) { s.f(); }
template struct __declspec(dllexport) S<int>;
Clang accepts the code, but the attribute doesn't have any effect since it's applied too late.
I think this would be hard for us to handle, so we should warn and drop the attribute.