HomePhabricator

Downgrade "definition of dllimport static field" error to warning for class…

Description

Downgrade "definition of dllimport static field" error to warning for class templates (PR19902)

This allows us to compile the following kind of code, which occurs in MSVC
headers:

template <typename> struct S {
  __declspec(dllimport) static int x;
};
template <typename T> int S<T>::x;

The definition works similarly to a dllimport inline function definition and
gets available_externally linkage.

Differential Revision: http://reviews.llvm.org/D3998

Details

Committed
hansJun 3 2014, 5:18 PM
Differential Revision
D3998: Downgrade "definition of dllimport static field" error to warning for class templates (PR19902)
Branches
Unknown
Tags
Unknown